leetcode-二分查找总结(34,240,1111,162,658;153,154,33,81;287,875,1011,1283;528,497,1292)

一:二分的两种写法: 一:经典的类似二分题目: 1:34:https://leetcode-cn.com/problems/find-first-and-last-position-of-element-in-sorted-array/ 题目: 思路:直接二分,但是要分开找,先找左边界,利用第一次的找到的l,结合r = len,一起再找右边界 代码:   2:240:https://leetcod
相关文章
相关标签/搜索