【单选题】下面程序段的功能是实现( )算法。 struct record{int key; int others;}; int bisearch(struct record r[ ], int k) { int low=0,mid,high=n-1; while(lowk ; ) high=mid-1;else low=mid+1; } return(0); }
【简答题】下面程序段的功能是实现二分查找算法,请在下划线处填上正确的语句。 struct record{int key; int others;}; int bisearch(struct record r[ ], int k) { int low=0,mid,high=n-1; while(low<=high) { __________; if(r[mid].key==k) return(mid+1); ...