/**
* @Classname Solution1
* @Description
* @Date 2020/1/13 18:46
* @Author SonnSei
*/
public class Solution1 {
public int searchInsert(int[] nums, int target) {
int pos = Arrays.binarySearch(nums, target);
return pos<0?-pos-1:pos;
}
}
LC35. 搜索插入位置
猜你喜欢
转载自blog.csdn.net/weixin_40602200/article/details/103962628
今日推荐
周排行