Open sky068 opened 4 years ago
https://xujiawei.top/2020/05/08/%E4%BA%8C%E5%88%86%E6%9F%A5%E6%89%BE/
123456789101112def searchInsert(nums, target): left = 0 right = len(nums) - 1 while left <= right: mid = (left + right) // 2 if target == nums[mid]: return mid
https://xujiawei.top/2020/05/08/%E4%BA%8C%E5%88%86%E6%9F%A5%E6%89%BE/
123456789101112def searchInsert(nums, target): left = 0 right = len(nums) - 1 while left <= right: mid = (left + right) // 2 if target == nums[mid]: return mid