在if语句中(A处)选择适当的条件完成以下二分查找。private int binarySearch(int []disp, int key){ int low = 0; int high = disp.length-1; while(low <=high){ int mid = (low + high)/2; if(key == disp[mid]) return mid + 1; if( A ){ high = mid -1; }else { low = mid + 1; } } return -1; }
A.key == disp[mid] B.key > disp[mid] C.key < disp[mid] D.key != disp[mid]
key == disp[mid]
key > disp[mid]
key < disp[mid]
key != disp[mid]
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。