摘要: 递归的二分查找: 1 int search(int *a, int target, int p, int r) 2 { 3 if (p target)11 return search(a, target, p, mid - 1);12 else13 ... 阅读全文
posted @ 2014-10-30 22:04 yyxayz 阅读(162) 评论(0) 推荐(0) 编辑
摘要: WelcomeToMyBitTricks1.获得int型最大值intgetMaxInt(){return(1>1;//除以2}6.乘以2的m次方intmulTwoPower(intn,intm){//计算n*(2^m)returnn>m;}8.判断一个数的奇偶性booleanisOddNumber(... 阅读全文
posted @ 2014-10-30 11:12 yyxayz 阅读(316) 评论(0) 推荐(0) 编辑