您当前的位置: 首页 >  搜索

35. 搜索插入位置

宝哥大数据 发布时间:2019-11-30 15:14:25 ,浏览量:3

一、35. 搜索插入位置 1.1、题目描述

在这里插入图片描述

1.2、题解 1.2.1、二分查找
class Solution:
    def searchInsert(self, nums: List[int], target: int) -> int:
        left = 0
        right = len(nums) - 1
        while left             
关注
打赏
1688896170
查看更多评论
0.0466s