- 博客(1)
- 收藏
- 关注
原创 二分查找法
#include<stdio.h> int Bsearch(int *p,int n,int x){ int low,high,mid; low=0;high=n-1; while(low<=high){ mid=(low+high)/2; if(x==p[mid]) break; else if (x<p[mid])/*x小于中值,最大值变为中值左一位*/ h...
2022-04-15 09:13:50 178 1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人