二分查找猜数小玩具
摘要:1 #include 2 int step=1; 3 void cut2_1(int w,int x,int y) 4 { 5 int m=x+(y-x)/2; 6 // printf("num:%d to %d\n",x,y); 7 if(w!=m) 8 { 9 ...
阅读全文
posted @
2015-08-05 10:35
Ricochet!
阅读(210)
推荐(0)
Ka的分治|归并排序,注释详尽
摘要:1 #include 2 int GBsort(int *A,int x,int y,int *B) 3 //A是待排列的数组,数组为[x,y),B是备份数组 4 { 5 if(y-x>1) //考虑数组不是单独一个元素的情况 6 { 7 int h=x+(y-x...
阅读全文
posted @
2015-08-04 17:59
Ricochet!
阅读(199)
推荐(0)