利用二进制非递归求幂,转载

摘要: 快速求正整数次幂,当然不能直接死乘。举个例子: 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 阅读(2606) 评论(1) 推荐(2) 编辑

未来两天要做的笔试题

摘要: 矩阵转置 is 和 as 有什么区别和联系 异步调用与同步调用有什么区别 event与公开的delegate变量有什么区别 请书写一个从Access数据库中获取某表全部内容并显示的小程序 .NET Framework有哪两个主要的组成部分? 确保多语言协作开发的是_______。 .NET中所有语言最终都被编译成______,再由______执行。 请区别以下概念:CLR CL... 阅读全文
posted @ 2008-10-18 15:24 wayleynam 阅读(246) 评论(4) 推荐(0) 编辑

二分法

摘要: Code Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --> public int BinarySearch(int[] list,int key,int low,int hight) { l... 阅读全文
posted @ 2008-10-17 23:18 wayleynam 阅读(135) 评论(0) 推荐(0) 编辑

回文.....利用栈来实现

摘要: 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 阅读(283) 评论(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 阅读(250) 评论(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 阅读(383) 评论(0) 推荐(0) 编辑