折半查找法實現

折半查找法的思想是:減小查找序列的長度,分而治之的進行關鍵字的查找。code 方法一:迭代實現遞歸 #include <stdio.h> int bin_search(int str[],int size,int key) { int low,mid,high; low=0; high=size-1; while(low<=high) {
相關文章
相關標籤/搜索