随笔分类 -  数据结构及笔试

关于求职的笔试及数据结构之类的东西
利用二进制非递归求幂,转载
摘要:快速求正整数次幂,当然不能直接死乘。举个例子: 3 ^ 999 = 3 * 3 * 3 * … * 3 直接乘要做998次乘法。但事实上可以这样做,先求出2^k次幂: 3 ^ 2 = 3 * 3 3 ^ 4 = (3 ^ 2) * (3 ^ 2) 3 ^ 8 = (3 ^ 4) * (3 ^ 4) 3 ^ 16 = (3 ^ 8) * (3 ^ 8) 3 ^ 32 = (3 ^ 16)... 阅读全文

posted @ 2009-12-27 23:48 wayleynam 阅读(2652) 评论(1) 推荐(2)

回文.....利用栈来实现
摘要:Code Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->using System; using System.Collections.Generic; using System.Text; using System.Collections;... 阅读全文

posted @ 2008-10-16 22:27 wayleynam 阅读(297) 评论(0) 推荐(0)

数据结构各种排序
摘要:插入排序 Code Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --> 1using System; 2using System.Collections.Generic; 3using System.Text; 4 5namespace... 阅读全文

posted @ 2008-10-12 22:57 wayleynam 阅读(263) 评论(0) 推荐(0)

C#单链表
摘要:Code Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->using System; using System.Collections.Generic; using System.Text; namespace bishi { pu... 阅读全文

posted @ 2008-10-12 17:04 wayleynam 阅读(407) 评论(0) 推荐(0)