1 Star 0 Fork 1

codes_test/cpp-interview

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
InsertionSearch.h 332 Bytes
一键复制 编辑 原始数据 按行查看 历史
//插值查找
int InsertionSearch(int a[], int value, int low, int high)
{
int mid = low+(value-a[low])/(a[high]-a[low])*(high-low);
if(a[mid]==value)
return mid;
if(a[mid]>value)
return InsertionSearch(a, value, low, mid-1);
if(a[mid]<value)
return InsertionSearch(a, value, mid+1, high);
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/codes_test/cpp-interview.git
git@gitee.com:codes_test/cpp-interview.git
codes_test
cpp-interview
cpp-interview
master

搜索帮助