小练习 RETURN
| Title | Solution | Difficulty | Topics | # |
|---|---|---|---|---|
| 只出现一次的数字 Single number | Java | Easy | Bit Manipulation | 136 |
| 多数元素 Majority element | Java | Easy | Greedy | 169 |
| 搜索二维矩阵 II Search a 2d matrix II | Java | Medium | Binary Search | 240 |
| 合并两个有序数组 Merge sorted array | Java | Easy | Array | 88 |
| 鸡蛋掉落 Super egg drop | Java | Hard | Binary Search | 887 |
| Title | Solution | Difficulty | Topics | # |
|---|---|---|---|---|
| 验证回文串 Valid palindrome | Java | Easy | String | 125 |
| 分割回文串 Palindrome partitioning | Java | Medium | Backtracking | 131 |
| 单词拆分 Word break | Java | Medium | Dynamic Programming | 139 |
| 单词拆分 II Word break II | Java | Hard | Dynamic Programming | 140 |
| 实现 Trie (前缀树) Implement trie prefix tree | Java | Medium | Design | 208 |
| 单词搜索 II Word search II | Java | Hard | Backtracking | 212 |
| 有效的字母异位词 Valid anagram | Java | Easy | Hashing | 242 |
| 字符串中的第一个唯一字符 First unique character in a string | Java | Easy | Hashing | 387 |
| 反转字符串 Reverse string | Java | Easy | String | 344 |
| Title | Solution | Difficulty | Topics | # |
|---|---|---|---|---|
| 乘积最大子数组 Maximum product subarray | Java | Medium | Dynamic Programming | 152 |
| 多数元素 Majority element | Java | Easy | Greedy | 169 |
| 旋转数组 Rotate array | Java | Medium | Array | 189 |
| 存在重复元素 Contains duplicate | Java | Easy | Hashing | 217 |
| 移动零 Move zeroes | Java | Easy | Two Pointers | 283 |
| 打乱数组 Shuffle an array | Java | Medium | Design | 384 |
| 两个数组的交集 II Intersection of two arrays II | Java | Easy | Binary Search | 350 |
| 递增的三元子序列 Increasing triplet subsequence | Java | Medium | Two Pointers | 334 |
| 搜索二维矩阵 II Search a 2d matrix II | Java | Medium | Binary Search | 240 |
| 除自身以外数组的乘积 Product of array except self | Java | Medium | Array | 238 |
| Title | Solution | Difficulty | Topics | # |
|---|---|---|---|---|
| 最小栈 Min stack | Java | Easy | Stack & Queue | 155 |
| 数组中的第K个最大元素 Kth largest element in an array | Java | Medium | Stack & Queue | 215 |
| 数据流的中位数 Median finder | Java | Hard | Design | 295 |
| 有序矩阵中第 K 小的元素 Kth smallest element in a sorted matrix | Java | Medium | Stack & Queue | 378 |
| 滑动窗口最大值 Sliding window maximum | Java | Medium | Stack & Queue | 239 |
| 基本计算器 II Basic calculator II | Java | Medium | Stack & Queue | 227 |
| 逆波兰表达式求值 Evaluate reverse polish notation | Java | Medium | Stack & Queue | 150 |
| 扁平化嵌套列表迭代器 Flatten nested list iterator | Java | Medium | Stack & Queue | 341 |
| 前 K 个高频元素 Top k frequent elements | Java | Medium | Stack & Queue | 347 |
| Title | Solution | Difficulty | Topics | # |
|---|---|---|---|---|
| 复制带随机指针的链表 Copy list with random pointer | Java | Medium | Hashing | 138 |
| 环形链表 Linked list cycle | Java | Easy | Linked List | 141 |
| 排序链表 Sort list | Java | Medium | Linked List | 148 |
| 相交链表 Intersection of two linked lists | Java | Easy | Linked List | 160 |
| 反转链表 Reverse linked list | Java | Easy | Linked List | 206 |
| 回文链表 Palindrome linked list | Java | Easy | Linked List | 234 |
| 删除链表中的节点 Delete node in a linked list | Java | Easy | Linked List | 237 |
| 奇偶链表 Odd even linked list | Java | Medium | Linked List | 328 |
| Title | Solution | Difficulty | Topics | # |
|---|---|---|---|---|
| Excel表列序号 Excel sheet column number | Java | Easy | Math | 171 |
| 四数相加 II 4 sum II | Java | Medium | Hashing | 454 |
| 常数时间插入、删除和获取随机元素 Insert delete getrandom o1 | Java | Medium | Design | 380 |
| Title | Solution | Difficulty | Topics | # |
|---|---|---|---|---|
| 二叉搜索树中第K小的元素 Kth smallest element in a bst | Java | Medium | Tree | 230 |
| 二叉树的最近公共祖先 Lowest common ancestor of a binary tree | Java | Medium | Tree | 236 |
| 二叉树的序列化与反序列化 Serialize and deserialize binary tree | Java | Hard | Tree | 295 |
| 天际线问题 The skyline problem | Java | Hard | Tree | 218 |
| Title | Solution | Difficulty | Topics | # |
|---|---|---|---|---|
| 最大数 Largest number | Java | Medium | Array | 179 |
| 摆动排序 II Wiggle sort II | Java | Medium | Binary Search | 324 |
| 寻找峰值 Find peak element | Java | Medium | Array | 162 |
| 寻找重复数 Find the duplicate number | Java | Medium | Binary Search | 287 |
| 计算右侧小于当前元素的个数 Count of smaller numbers after self | Java | Hard | Binary Search | 315 |
| Title | Solution | Difficulty | Topics | # |
|---|---|---|---|---|
| 至少有K个重复字符的最长子串 Longest substring with at least k repeating characters | Java | Hard | Dynamic Programming | 395 |
| 二叉树中的最大路径和 Binary tree maximum path sum | Java | Hard | Tree | 124 |
| 最长连续序列 Longest consecutive sequence | Java | Hard | Array | 128 |
| 打家劫舍 House robber | Java | Medium | Dynamic Programming | 198 |
| 完全平方数 Perfect squares | Java | Medium | Dynamic Programming | 279 |
| 最长上升子序列 Longest increasing subsequence | Java | Medium | Dynamic Programming | 300 |
| 零钱兑换 Coin change | Java | Medium | Dynamic Programming | 322 |
| 矩阵中的最长递增路径 Longest increasing path in a matrix | Java | Hard | Dynamic Programming | 329 |
| Title | Solution | Difficulty | Topics | # |
|---|---|---|---|---|
| 单词接龙 Word ladder | Java | Hard | Graph | 127 |
| 岛屿数量 Number of islands | Java | Medium | Dynamic Programming | 200 |
| 课程表 Course Schedule | Java | Medium | Graph | 207 |
| 课程表 II Course Schedule II | Java | Medium | Graph | 210 |
| Title | Solution | Difficulty | Topics | # |
|---|---|---|---|---|
| 只出现一次的数字 Single number | Java | Easy | Bit Manipulation | 136 |
| 直线上最多的点数 Max points on a line | Java | Hard | Math | 149 |
| 分数到小数 Fraction to recurring decimal | Java | Medium | Hashing | 166 |
| 阶乘后的零 Factorial trailing zeroes | Java | Easy | Math | 172 |
| 颠倒二进制位 Reverse bits | Java | Easy | Bit Manipulation | 190 |
| 位1的个数 Number of 1 bits | Java | Easy | Bit Manipulation | 191 |
| 计数质数 Count primes | Java | Easy | Math | 204 |
| 缺失的数字 Missing number | Java | Easy | Math | *** |
| 3的幂 Power of three | Java | Easy | Math | 326 |