折半查找法实现

折半查找法的思想是:减小查找序列的长度,分而治之的进行关键字的查找。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) {
相关文章
相关标签/搜索