1 Star 0 Fork 5

咸鱼1172 / interview

forked from idealzhang / interview 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
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);
}
1
https://gitee.com/HouHuiChao/interview.git
git@gitee.com:HouHuiChao/interview.git
HouHuiChao
interview
interview
master

搜索帮助