摘要: 我觉得要了解这两种策略,除了多刷题没别的方法。二分搜索#include #include int BinSerach(int a[], int first, int LEN,int j){ if(j == a[(first + LEN)/2]) return j; if(j a[(first + LEN)/2]) return BinSerach(a, (first + LEN)/2, LEN, j); printf("no this intger\n");} int main(){ const int LEN = 1000; int a[LEN]; int i; for( 阅读全文
posted @ 2014-03-14 16:18 elroyzhang 阅读(172) 评论(0) 推荐(0) 编辑