所用知识 二分查找 所用语言 Java 解题思路 定义左指针,右指针,计算中间值,确认向前或向后查找 完整代码 public int searchInsert (int[] labels, int target) { // write code here int n=labels.length; int left =0; int right =n-1; while(left<=right){ int mid = (right+left)/2; if(labels[mid]<target){ left=mid+1; }else if(labels[mid]>target){ r...