跳到主要内容

Array Binary Search(数组二分查找)

a. 二分下标题目

题号标题题解难度
0704Binary Search(二分查找)Python简单
0374Guess Number Higher or Lower(猜数字大小)Python简单
0035Search Insert Position(搜索插入位置)Python简单
0034Find First and Last Position of Element in Sorted Array(在排序数组中查找元素的第一个和最后一个位置)Python中等
0167Two Sum II - Input Array Is Sorted(两数之和 II - 输入有序数组)Python中等
0153Find Minimum in Rotated Sorted Array(寻找旋转排序数组中的最小值)Python中等
0154Find Minimum in Rotated Sorted Array II(寻找旋转排序数组中的最小值 II)Python困难
0033Search in Rotated Sorted Array(搜索旋转排序数组)Python中等
0081Search in Rotated Sorted Array II(搜索旋转排序数组 II)Python中等
0278First Bad Version(第一个错误的版本)Python简单
0162Find Peak Element(寻找峰值)Python中等
0852Peak Index in a Mountain Array(山脉数组的峰顶索引)Python中等
1095Find in Mountain Array(山脉数组中查找目标值)Python困难
0744Find Smallest Letter Greater Than Target(寻找比目标字母大的最小字母)Python简单
0004Median of Two Sorted Arrays(寻找两个正序数组的中位数)Python困难
0074Search a 2D Matrix(搜索二维矩阵)Python中等
0240Search a 2D Matrix II(搜索二维矩阵 II)Python中等

b. 二分答案题目

题号标题题解难度
0069Sqrt(x)(x 的平方根)Python简单
0287Find the Duplicate Number(寻找重复数)Python中等
0050Pow(x, n)Python中等
0367Valid Perfect Square(有效的完全平方数)Python简单
1300Sum of Mutated Array Closest to Target(转变数组后最接近目标值的数组和)Python中等
0400Nth Digit(第 N 位数字)Python中等

c. 复杂的二分查找问题

题号标题题解难度
0875Koko Eating Bananas(爱吃香蕉的珂珂)Python中等
0410Split Array Largest Sum(分割数组的最大值)Python困难
0209Minimum Size Subarray Sum(长度最小的子数组)Python中等
0658Find K Closest Elements(找到 K 个最接近的元素)Python中等
0270Closest Binary Search Tree Value(最接近的二叉搜索树值)Python简单
0702Search in a Sorted Array of Unknown Size(搜索长度未知的有序数组)Python中等
0349Intersection of Two Arrays(两个数组的交集)Python简单
0350Intersection of Two Arrays II(两个数组的交集 II)Python简单
0287Find the Duplicate Number(寻找重复数)Python中等
0719Find K-th Smallest Pair Distance(找出第 K 小的数对距离)Python困难
02593Sum Smaller(较小的三数之和)Python中等
1011Capacity to Ship Packages Within D Days(在 D 天内送达包裹的能力)Python中等
1482Minimum Number of Days to Make m Bouquets(制作 m 束花所需的最少天数)Python中等