Fork me on github
摘要: 思路 二分查找,注意如果target不在数组中时,需要判断一下下标 代码 class Solution { public int searchInsert(int[] nums, int target) { //二分查找 int left = 0; int right = nums.length - 阅读全文
posted @ 2020-07-17 22:58 zjy4fun 阅读(130) 评论(0) 推荐(0) 编辑