## 二分查找

| \# | 题名 | 题解 | 通过率 | 难度 | 出现频率   |
|------|----------------------|-----|--------|----|--------|
|668|[乘法表中第k小的数](https://leetcode-cn.com/problems/kth-smallest-number-in-multiplication-table)   |[12](https://leetcode-cn.com/problems/kth-smallest-number-in-multiplication-table/solution)|44.1%|困难|86.44%|
|410|[分割数组的最大值](https://leetcode-cn.com/problems/split-array-largest-sum)   |[17](https://leetcode-cn.com/problems/split-array-largest-sum/solution)|40.1%|困难|82.61%|
|4|[寻找两个有序数组的中位数](https://leetcode-cn.com/problems/median-of-two-sorted-arrays)   |[335](https://leetcode-cn.com/problems/median-of-two-sorted-arrays/solution)|36.4%|困难|65.97%|
|483|[最小好进制](https://leetcode-cn.com/problems/smallest-good-base)   |[8](https://leetcode-cn.com/problems/smallest-good-base/solution)|35.5%|困难|59.07%|
|887|[鸡蛋掉落](https://leetcode-cn.com/problems/super-egg-drop)   |[10](https://leetcode-cn.com/problems/super-egg-drop/solution)|20.4%|困难|58.8%|
|300|[最长上升子序列](https://leetcode-cn.com/problems/longest-increasing-subsequence)   |[76](https://leetcode-cn.com/problems/longest-increasing-subsequence/solution)|43.5%|中等|58.08%|
|1044|[最长重复子串](https://leetcode-cn.com/problems/longest-duplicate-substring)   |[12](https://leetcode-cn.com/problems/longest-duplicate-substring/solution)|14.6%|困难|56.34%|
|778|[水位上升的泳池中游泳](https://leetcode-cn.com/problems/swim-in-rising-water)   |[14](https://leetcode-cn.com/problems/swim-in-rising-water/solution)|45.5%|困难|51.29%|
|354|[俄罗斯套娃信封问题](https://leetcode-cn.com/problems/russian-doll-envelopes)   |[11](https://leetcode-cn.com/problems/russian-doll-envelopes/solution)|33.0%|困难|51.02%|
|793|[阶乘函数后K个零](https://leetcode-cn.com/problems/preimage-size-of-factorial-zeroes-function)   |[9](https://leetcode-cn.com/problems/preimage-size-of-factorial-zeroes-function/solution)|32.6%|困难|49.26%|
|1095|[山脉数组中查找目标值](https://leetcode-cn.com/problems/find-in-mountain-array)   |[14](https://leetcode-cn.com/problems/find-in-mountain-array/solution)|28.5%|困难|48.82%|
|1157|[子数组中占绝大多数的元素](https://leetcode-cn.com/problems/online-majority-element-in-subarray)   |[18](https://leetcode-cn.com/problems/online-majority-element-in-subarray/solution)|23.0%|困难|46.1%|
|1111|[有效括号的嵌套深度](https://leetcode-cn.com/problems/maximum-nesting-depth-of-two-valid-parentheses-strings)   |[18](https://leetcode-cn.com/problems/maximum-nesting-depth-of-two-valid-parentheses-strings/solution)|65.9%|中等|45.59%|
|862|[和至少为 K 的最短子数组](https://leetcode-cn.com/problems/shortest-subarray-with-sum-at-least-k)   |[21](https://leetcode-cn.com/problems/shortest-subarray-with-sum-at-least-k/solution)|12.3%|困难|45.01%|
|378|[有序矩阵中第K小的元素](https://leetcode-cn.com/problems/kth-smallest-element-in-a-sorted-matrix)   |[37](https://leetcode-cn.com/problems/kth-smallest-element-in-a-sorted-matrix/solution)|57.2%|中等|44.69%|
|878|[第 N 个神奇数字](https://leetcode-cn.com/problems/nth-magical-number)   |[12](https://leetcode-cn.com/problems/nth-magical-number/solution)|20.9%|困难|44.39%|
|644|[最大平均子段和 II](https://leetcode-cn.com/problems/maximum-average-subarray-ii)   |[4](https://leetcode-cn.com/problems/maximum-average-subarray-ii/solution)|31.6%|困难|43.48%|
|718|[最长重复子数组](https://leetcode-cn.com/problems/maximum-length-of-repeated-subarray)   |[25](https://leetcode-cn.com/problems/maximum-length-of-repeated-subarray/solution)|47.7%|中等|41.79%|
|327|[区间和的个数](https://leetcode-cn.com/problems/count-of-range-sum)   |[13](https://leetcode-cn.com/problems/count-of-range-sum/solution)|31.8%|困难|40.63%|
|658|[找到 K 个最接近的元素](https://leetcode-cn.com/problems/find-k-closest-elements)   |[23](https://leetcode-cn.com/problems/find-k-closest-elements/solution)|41.9%|中等|39.54%|
|33|[搜索旋转排序数组](https://leetcode-cn.com/problems/search-in-rotated-sorted-array)   |[180](https://leetcode-cn.com/problems/search-in-rotated-sorted-array/solution)|36.2%|中等|38.63%|
|1231|[分享巧克力](https://leetcode-cn.com/problems/divide-chocolate)   |[7](https://leetcode-cn.com/problems/divide-chocolate/solution)|54.8%|困难|37.3%|
|493|[翻转对](https://leetcode-cn.com/problems/reverse-pairs)   |[15](https://leetcode-cn.com/problems/reverse-pairs/solution)|21.2%|困难|33.89%|
|153|[寻找旋转排序数组中的最小值](https://leetcode-cn.com/problems/find-minimum-in-rotated-sorted-array)   |[75](https://leetcode-cn.com/problems/find-minimum-in-rotated-sorted-array/solution)|50.1%|中等|33.63%|
|240|[搜索二维矩阵 II](https://leetcode-cn.com/problems/search-a-2d-matrix-ii)   |[49](https://leetcode-cn.com/problems/search-a-2d-matrix-ii/solution)|38.1%|中等|32.71%|
|1235|[规划兼职工作](https://leetcode-cn.com/problems/maximum-profit-in-job-scheduling)   |[17](https://leetcode-cn.com/problems/maximum-profit-in-job-scheduling/solution)|41.8%|困难|31.91%|
|497|[非重叠矩形中的随机点](https://leetcode-cn.com/problems/random-point-in-non-overlapping-rectangles)   |[9](https://leetcode-cn.com/problems/random-point-in-non-overlapping-rectangles/solution)|36.8%|中等|29.87%|
|174|[地下城游戏](https://leetcode-cn.com/problems/dungeon-game)   |[35](https://leetcode-cn.com/problems/dungeon-game/solution)|38.7%|困难|29.25%|
|287|[寻找重复数](https://leetcode-cn.com/problems/find-the-duplicate-number)   |[83](https://leetcode-cn.com/problems/find-the-duplicate-number/solution)|62.2%|中等|29.17%|
|786|[第 K 个最小的素数分数](https://leetcode-cn.com/problems/k-th-smallest-prime-fraction)   |[7](https://leetcode-cn.com/problems/k-th-smallest-prime-fraction/solution)|33.9%|困难|28.75%|
|704|[二分查找](https://leetcode-cn.com/problems/binary-search)   |[50](https://leetcode-cn.com/problems/binary-search/solution)|51.6%|简单|28.64%|
|50|[Pow(x, n)](https://leetcode-cn.com/problems/powx-n)   |[91](https://leetcode-cn.com/problems/powx-n/solution)|33.5%|中等|27.39%|
|167|[两数之和 II - 输入有序数组](https://leetcode-cn.com/problems/two-sum-ii-input-array-is-sorted)   |[133](https://leetcode-cn.com/problems/two-sum-ii-input-array-is-sorted/solution)|51.5%|简单|27.36%|
|911|[在线选举](https://leetcode-cn.com/problems/online-election)   |[11](https://leetcode-cn.com/problems/online-election/solution)|36.6%|中等|26.99%|
|69|[x 的平方根](https://leetcode-cn.com/problems/sqrtx)   |[143](https://leetcode-cn.com/problems/sqrtx/solution)|37.3%|简单|26.52%|
|162|[寻找峰值](https://leetcode-cn.com/problems/find-peak-element)   |[53](https://leetcode-cn.com/problems/find-peak-element/solution)|43.6%|中等|26.12%|
|710|[黑名单中的随机数](https://leetcode-cn.com/problems/random-pick-with-blacklist)   |[3](https://leetcode-cn.com/problems/random-pick-with-blacklist/solution)|27.3%|困难|26.08%|
|74|[搜索二维矩阵](https://leetcode-cn.com/problems/search-a-2d-matrix)   |[90](https://leetcode-cn.com/problems/search-a-2d-matrix/solution)|36.6%|中等|25.75%|
|927|[三等分](https://leetcode-cn.com/problems/three-equal-parts)   |[8](https://leetcode-cn.com/problems/three-equal-parts/solution)|28.9%|困难|25.44%|
|1201|[丑数 III](https://leetcode-cn.com/problems/ugly-number-iii)   |[13](https://leetcode-cn.com/problems/ugly-number-iii/solution)|18.1%|中等|24.9%|
|209|[长度最小的子数组](https://leetcode-cn.com/problems/minimum-size-subarray-sum)   |[58](https://leetcode-cn.com/problems/minimum-size-subarray-sum/solution)|40.4%|中等|24.59%|
|392|[判断子序列](https://leetcode-cn.com/problems/is-subsequence)   |[83](https://leetcode-cn.com/problems/is-subsequence/solution)|47.5%|简单|24.33%|
|34|[在排序数组中查找元素的第一个和最后一个位置](https://leetcode-cn.com/problems/find-first-and-last-position-of-element-in-sorted-array)   |[207](https://leetcode-cn.com/problems/find-first-and-last-position-of-element-in-sorted-array/solution)|38.3%|中等|23.98%|
|352|[将数据流变为多个不相交区间](https://leetcode-cn.com/problems/data-stream-as-disjoint-intervals)   |[10](https://leetcode-cn.com/problems/data-stream-as-disjoint-intervals/solution)|50.4%|困难|23.52%|
|363|[矩形区域不超过 K 的最大数值和](https://leetcode-cn.com/problems/max-sum-of-rectangle-no-larger-than-k)   |[9](https://leetcode-cn.com/problems/max-sum-of-rectangle-no-larger-than-k/solution)|32.4%|困难|23.35%|
|315|[计算右侧小于当前元素的个数](https://leetcode-cn.com/problems/count-of-smaller-numbers-after-self)   |[48](https://leetcode-cn.com/problems/count-of-smaller-numbers-after-self/solution)|36.7%|困难|22.91%|
|454|[四数相加 II](https://leetcode-cn.com/problems/4sum-ii)   |[32](https://leetcode-cn.com/problems/4sum-ii/solution)|53.7%|中等|22.06%|
|981|[基于时间的键值存储](https://leetcode-cn.com/problems/time-based-key-value-store)   |[13](https://leetcode-cn.com/problems/time-based-key-value-store/solution)|33.1%|中等|22.04%|
|81|[搜索旋转排序数组 II](https://leetcode-cn.com/problems/search-in-rotated-sorted-array-ii)   |[45](https://leetcode-cn.com/problems/search-in-rotated-sorted-array-ii/solution)|34.6%|中等|21.12%|
|222|[完全二叉树的节点个数](https://leetcode-cn.com/problems/count-complete-tree-nodes)   |[35](https://leetcode-cn.com/problems/count-complete-tree-nodes/solution)|64.2%|中等|20.81%|
|1182|[与目标颜色间的最短距离](https://leetcode-cn.com/problems/shortest-distance-to-target-color)   |[5](https://leetcode-cn.com/problems/shortest-distance-to-target-color/solution)|27.9%|中等|20.21%|
|230|[二叉搜索树中第K小的元素](https://leetcode-cn.com/problems/kth-smallest-element-in-a-bst)   |[81](https://leetcode-cn.com/problems/kth-smallest-element-in-a-bst/solution)|67.4%|中等|20.17%|
|350|[两个数组的交集 II](https://leetcode-cn.com/problems/intersection-of-two-arrays-ii)   |[119](https://leetcode-cn.com/problems/intersection-of-two-arrays-ii/solution)|45.6%|简单|20.03%|
|1011|[在 D 天内送达包裹的能力](https://leetcode-cn.com/problems/capacity-to-ship-packages-within-d-days)   |[8](https://leetcode-cn.com/problems/capacity-to-ship-packages-within-d-days/solution)|49.5%|中等|20.01%|
|1060|[有序数组中的缺失元素](https://leetcode-cn.com/problems/missing-element-in-sorted-array)   |[12](https://leetcode-cn.com/problems/missing-element-in-sorted-array/solution)|45.4%|中等|19.58%|
|475|[供暖器](https://leetcode-cn.com/problems/heaters)   |[38](https://leetcode-cn.com/problems/heaters/solution)|28.7%|简单|19.58%|
|29|[两数相除](https://leetcode-cn.com/problems/divide-two-integers)   |[127](https://leetcode-cn.com/problems/divide-two-integers/solution)|19.0%|中等|18.87%|
|528|[按权重随机选择](https://leetcode-cn.com/problems/random-pick-with-weight)   |[11](https://leetcode-cn.com/problems/random-pick-with-weight/solution)|39.3%|中等|18.66%|
|349|[两个数组的交集](https://leetcode-cn.com/problems/intersection-of-two-arrays)   |[107](https://leetcode-cn.com/problems/intersection-of-two-arrays/solution)|67.4%|简单|17.34%|
|436|[寻找右区间](https://leetcode-cn.com/problems/find-right-interval)   |[22](https://leetcode-cn.com/problems/find-right-interval/solution)|42.1%|中等|16.54%|
|275|[H指数 II](https://leetcode-cn.com/problems/h-index-ii)   |[24](https://leetcode-cn.com/problems/h-index-ii/solution)|39.3%|中等|15.06%|
|270|[最接近的二叉搜索树值](https://leetcode-cn.com/problems/closest-binary-search-tree-value)   |[25](https://leetcode-cn.com/problems/closest-binary-search-tree-value/solution)|49.0%|简单|13.77%|
|154|[寻找旋转排序数组中的最小值 II](https://leetcode-cn.com/problems/find-minimum-in-rotated-sorted-array-ii)   |[42](https://leetcode-cn.com/problems/find-minimum-in-rotated-sorted-array-ii/solution)|46.2%|困难|10.48%|
|35|[搜索插入位置](https://leetcode-cn.com/problems/search-insert-position)   |[245](https://leetcode-cn.com/problems/search-insert-position/solution)|44.7%|简单|10.12%|
|278|[第一个错误的版本](https://leetcode-cn.com/problems/first-bad-version)   |[51](https://leetcode-cn.com/problems/first-bad-version/solution)|35.4%|简单|8.91%|
|374|[猜数字大小](https://leetcode-cn.com/problems/guess-number-higher-or-lower)   |[33](https://leetcode-cn.com/problems/guess-number-higher-or-lower/solution)|41.8%|简单|8.62%|
|1292|[元素和小于等于阈值的正方形的最大边长](https://leetcode-cn.com/problems/maximum-side-length-of-a-square-with-sum-less-than-or-equal-to-threshold)   |[25](https://leetcode-cn.com/problems/maximum-side-length-of-a-square-with-sum-less-than-or-equal-to-threshold/solution)|37.8%|中等|8.33%|
|441|[排列硬币](https://leetcode-cn.com/problems/arranging-coins)   |[43](https://leetcode-cn.com/problems/arranging-coins/solution)|39.7%|简单|7.65%|
|852|[山脉数组的峰顶索引](https://leetcode-cn.com/problems/peak-index-in-a-mountain-array)   |[68](https://leetcode-cn.com/problems/peak-index-in-a-mountain-array/solution)|68.7%|简单|7.44%|
|1237|[找出给定方程的正整数解](https://leetcode-cn.com/problems/find-positive-integer-solution-for-a-given-equation)   |[30](https://leetcode-cn.com/problems/find-positive-integer-solution-for-a-given-equation/solution)|67.1%|简单|7.42%|
|1283|[使结果不超过阈值的最小除数](https://leetcode-cn.com/problems/find-the-smallest-divisor-given-a-threshold)   |[27](https://leetcode-cn.com/problems/find-the-smallest-divisor-given-a-threshold/solution)|29.2%|中等|5.75%|
|744|[寻找比目标字母大的最小字母](https://leetcode-cn.com/problems/find-smallest-letter-greater-than-target)   |[42](https://leetcode-cn.com/problems/find-smallest-letter-greater-than-target/solution)|43.9%|简单|4.59%|
|875|[爱吃香蕉的珂珂](https://leetcode-cn.com/problems/koko-eating-bananas)   |[18](https://leetcode-cn.com/problems/koko-eating-bananas/solution)|37.4%|中等|4.55%|
|367|[有效的完全平方数](https://leetcode-cn.com/problems/valid-perfect-square)   |[54](https://leetcode-cn.com/problems/valid-perfect-square/solution)|42.8%|简单|2.83%|
|1198|[找出所有行中最小公共元素](https://leetcode-cn.com/problems/find-smallest-common-element-in-all-rows)   |[8](https://leetcode-cn.com/problems/find-smallest-common-element-in-all-rows/solution)|70.6%|中等|&nbsp;|
|1150|[检查一个数是否在数组中占绝大多数](https://leetcode-cn.com/problems/check-if-a-number-is-majority-element-in-a-sorted-array)   |[14](https://leetcode-cn.com/problems/check-if-a-number-is-majority-element-in-a-sorted-array/solution)|65.2%|简单|&nbsp;|
|1064|[不动点](https://leetcode-cn.com/problems/fixed-point)   |[16](https://leetcode-cn.com/problems/fixed-point/solution)|72.2%|简单|&nbsp;|
|774|[最小化去加油站的最大距离](https://leetcode-cn.com/problems/minimize-max-distance-to-gas-station)   |[6](https://leetcode-cn.com/problems/minimize-max-distance-to-gas-station/solution)|55.3%|困难|&nbsp;|
|702|[搜索长度未知的有序数组](https://leetcode-cn.com/problems/search-in-a-sorted-array-of-unknown-size)   |[13](https://leetcode-cn.com/problems/search-in-a-sorted-array-of-unknown-size/solution)|65.2%|中等|&nbsp;|
|719|[找出第 k 小的距离对](https://leetcode-cn.com/problems/find-k-th-smallest-pair-distance)   |[12](https://leetcode-cn.com/problems/find-k-th-smallest-pair-distance/solution)|30.5%|困难|&nbsp;|
|302|[包含全部黑色像素的最小矩形](https://leetcode-cn.com/problems/smallest-rectangle-enclosing-black-pixels)   |[6](https://leetcode-cn.com/problems/smallest-rectangle-enclosing-black-pixels/solution)|69.1%|困难|&nbsp;|



