- Problems
- Interview
- Weekly Contest
- Biweekly Contest
- Permutation - Combination - Subset
- Tree
- Queue & Stack
- List
- Dynamic Programming
- Others
- 1. Two Sum (两数之和) -
Array (数组)
,Hash Table (哈希表)
- 3. Longest Substring Without Repeating Characters (无重复字符的最长子串) -
Sliding Window (滑动窗口)
- 5. Longest Palindromic Substring (最长回文子串) -
Sliding Window (滑动窗口)
,Dynamic Programming (动态规划)
- 17. Letter Combinations of a Phone Number (电话号码的字母组合) -
Backtracking (回溯)
- 19. Remove Nth Node From End of List (删除链表的倒数第 N 个结点) -
Linked List (链表)
,Double Point (双指针)
- 21. Merge Two Sorted Lists (合并两个有序链表) -
Linked List (链表)
,Recursive (递归)
- 23. Merge k Sorted Lists (合并K个升序链表) -
Linked List (链表)
,Priority Queue (优先级队列)
- 26. Remove Duplicates from Sorted Array (删除有序数组中的重复项) -
Array (数组)
,Double Point (双指针)
- 27. Remove Element (移除元素) -
Array (数组)
,Double Point (双指针)
- 35. Search Insert Position (搜索插入位置) -
Binary Search (二分查找)
- 36. Valid Sudoku (有效的数独) -
Array (数组)
,Hash Table (哈希表)
,Matrix (矩阵)
- 37. Sudoku Solver (解数独) -
Array (数组)
,Backtracking (回溯)
,Matrix (矩阵)
- 39. Combination Sum (组合总和) -
Backtracking (回溯)
- 40. Combination Sum II (组合总和 II) -
Backtracking (回溯)
- 46. Permutations (全排列) -
Backtracking (回溯)
- 47. Permutations II (全排列 II) -
Backtracking (回溯)
- 51. N-Queens (N 皇后) -
Backtracking (回溯)
- 64. Minimum Path Sum (最小路径和) -
Dynamic Programming (动态规划)
- 70. Climbing Stairs (爬楼梯) -
Dynamic Programming (动态规划)
- 77. Combinations (组合) -
Backtracking (回溯)
- 78. Subsets (子集) -
Backtracking (回溯)
- 83. Remove Duplicates from Sorted List (删除排序链表中的重复元素) -
Linked List (链表)
,Double Point (双指针)
- 86. Partition List (分隔链表) -
Linked List (链表)
,Double Point (双指针)
- 90. Subsets ii (子集 II) -
Backtracking (回溯)
- 92. Reverse Linked List II (反转链表 II) -
Linked List (链表)
- 94. Binary Tree Inorder Traversal (二叉树的中序遍历) -
Binary Tree (二叉树)
,Inorder (中序遍历)
,DFS (深度优先搜索)
- 98. Validate Binary Search Tree (验证二叉搜索树) -
Binary Tree (二叉树)
,Binary Search Tree (二叉搜索树)
,Inorder (中序遍历)
- 102. Binary Tree Level Order Traversal (二叉树的层序遍历) -
Binary Tree (二叉树)
,Level order (层序遍历)
,BFS (广度优先搜索)
- 104. Maximum Depth of Binary Tree (二叉树的最大深度) -
Binary Tree (二叉树)
,BFS (广度优先搜索)
,DFS (深度优先搜索)
,Backtracking (回溯)
- 108. Convert Sorted Array to Binary Search Tree (将有序数组转换为二叉搜索树) -
Binary Tree (二叉树)
,Binary Search Tree (二叉搜索树)
- 110. Balanced Binary Tree (平衡二叉树) -
Binary Tree (二叉树)
- 116. Populating Next Right Pointers in Each Node (填充每个节点的下一个右侧节点指针) -
BFS (广度优先搜索)
,DFS (深度优先搜索)
- 121. Best Time to Buy and Sell Stock (买卖股票的最佳时机) -
Array (数组)
,Dynamic Programming (动态规划)
- 122. Best Time to Buy and Sell Stock II (买卖股票的最佳时机 II) -
Dynamic Programming (动态规划)
,Greedy (贪心)
- 123. Best Time to Buy and Sell Stock III (买卖股票的最佳时机 III) -
Array (数组)
,Dynamic Programming (动态规划)
- 136. Single Number (只出现一次的数字) -
Array (数组)
,Bit Manipulation (位运算)
- 141. Linked List Cycle (环形链表) -
Linked List (链表)
,Double Point (双指针)
- 142. Linked List Cycle II (环形链表 II) -
Linked List (链表)
,Double Point (双指针)
,Hash Table (哈希表)
- 144. Binary Tree Preorder Traversal (二叉树的前序遍历) -
Binary Tree (二叉树)
,Preorder (前序遍历)
,DFS (深度优先搜索)
- 145. Binary Tree Postorder Traversal (二叉树的后序遍历) -
Binary Tree (二叉树)
,Postorder (后序遍历)
,DFS (深度优先搜索)
- 160. Intersection of Two Linked Lists (相交链表) -
Linked List (链表)
,Hash Table (哈希表)
- 167. Two Sum II - Input Array Is Sorted (两数之和 II - 输入有序数组) -
Array (数组)
,Double Point (双指针)
- 173. Binary Search Tree Iterator (二叉搜索树迭代器) -
Binary Tree (二叉树)
,Binary Search Tree (二叉搜索树)
,Inorder (中序遍历)
- 188. Best Time to Buy and Sell Stock IV (买卖股票的最佳时机 IV) -
Array (数组)
,Dynamic Programming (动态规划)
- 189. Rotate Array (轮转数组) -
Array (数组)
,Double Point (双指针)
- 206. Reverse Linked List (反转链表) -
Double Point (双指针)
,Recursive (递归)
- 216. Combination Sum III (组合总和 III) -
Backtracking (回溯)
- 217. Contains Duplicate (存在重复元素) -
Hash Table (哈希表)
- 220. Contains Duplicate III (存在重复元素 III) -
Binary Tree (二叉树)
,Binary Search Tree (二叉搜索树)
- 235. Lowest Common Ancestor of a Binary Search Tree (二叉搜索树的最近公共祖先) -
Binary Tree (二叉树)
,Binary Search Tree (二叉搜索树)
,DFS (深度优先搜索)
- 278. First Bad Version (第一个错误的版本) -
Binary Search (二分查找)
- 283. Move Zeroes (移动零) -
Array (数组)
,Double Point (双指针)
- 309. Best Time to Buy and Sell Stock with Cool down (最佳买卖股票时机含冷冻期) -
Array (数组)
,Dynamic Programming (动态规划)
- 344. Reverse String (反转字符串) -
Double Point (双指针)
- 349. Intersection of Two Arrays (两个数组的交集) -
Array (数组)
,Double Point (双指针)
- 350. Intersection of Two Arrays II (两个数组的交集 II) -
Array (数组)
,Double Point (双指针)
,Hash Table (哈希表)
- 450. Delete Node in a BST (删除二叉搜索树中的节点) -
Binary Tree (二叉树)
,Binary Search Tree (二叉搜索树)
- 491. Increasing Subsequences (递增子序列) -
Backtracking (回溯)
,Hash Table (哈希表)
- 542. 01 Matrix (01 矩阵) -
BFS (广度优先搜索)
,Dynamic Programming (动态规划)
- 557. Reverse Words in a String III (反转字符串中的单词 III) -
String (字符串)
- 567. Permutation in String (字符串的排列) -
Sliding Window (滑动窗口)
- 617. Merge Two Binary Trees (合并二叉树) -
DFS (深度优先搜索)
- 695. Max Area of Island (岛屿的最大面积) -
DFS (深度优先搜索)
- 700. Search in a Binary Search Tree (二叉搜索树中的搜索) -
Binary Tree (二叉树)
,Binary Search Tree (二叉搜索树)
,Recursive (递归)
- 701. Insert into a Binary Search Tree (二叉搜索树中的插入操作) -
Binary Tree (二叉树)
,Binary Search Tree (二叉搜索树)
,Recursive (递归)
- 703. Kth Largest Element in a Stream (数据流中的第 K 大元素) -
Binary Tree (二叉树)
,Binary Search Tree (二叉搜索树)
- 704. Binary Search (二分查找) -
Binary Search (二分查找)
- 733. Flood Fill (图像渲染) -
DFS (深度优先搜索)
- 784. Letter case permutation (字母大小写全排列) -
BFS (广度优先搜索)
,Backtracking (回溯)
- 876. Middle of the Linked List (链表的中间结点) -
Linked List (链表)
,Double Point (双指针)
- 977. Squares of a Sorted Array (有序数组的平方) -
Double Point (双指针)
- 994. Rotting Oranges (腐烂的橘子) -
BFS (广度优先搜索)
- 1732. Find the Highest Altitude (找到最高海拔) -
Prefix Sum (前缀和)
- 08.01. Three steps problem (三步问题) -
Dynamic Programming (动态规划)
- 6245. Find the pivot integer (找出中枢整数)
- 6246. Append characters to string to make subsequence (追加字符以获得子序列)
- 6247. Remove nodes from linked list (从链表中移除节点)
- 6257. Delete Greatest Value in Each Row (删除每行中的最大值)
- 6258. Longest Square Streak in an Array (数组中最长的方波)
- 6259. Design Memory Allocator (设计内存分配器)
- 6265. Count Pairs Of Similar Strings (统计相似字符串对的数目)
- 6266. Smallest Value After Replacing With Sum of Prime Factors (使用质因数之和替换后可以取到的最小值)
- 6283. Maximum Count of Positive Integer and Negative Integer (正整数和负整数的最大计数)
- 6285. Maximal Score After Applying K Operations (执行 K 次操作后的最大分数)
- 6291. Difference Between Element Sum and Digit Sum of an Array (数组元素和与数字和的绝对差)
- 6292. Increment SubMatrices by One (子矩阵元素加 1)
- 2544. Alternating Digit Sum (交替数字和)
- 2545. Sort the Students by Their Kth Score (根据第 K 场考试的分数排序)
- 2546. Apply Bitwise Operations to Make Strings Equal (执行逐位运算使字符串相等)
- 6348. Take Gifts From the Richest Pile (从数量最多的堆取走礼物)
- 6347. Count Vowel Strings in Ranges (统计范围内的元音字符串数)
- 2560. House Robber IV (打家劫舍 IV)
- 6354. Find the Array Concatenation Value (找出数组的串联值)
- 6355. Count the Number of Fair Pairs (统计公平数对的数目)
- 6369. Left and Right Sum Differences (左右元素和的差值)
- 6368. Find the Divisibility Array of a String (找出字符串的可整除数组)
- 2576. Find the Maximum Number of Marked Indices (求出最多标记下标)
- 6315. Count the Number of Vowel Strings in Range (统计范围内的元音字符串数)
- 6316. Rearrange Array to Maximize Prefix Score (重排数组以得到最大前缀分数)
- 6317. Count the Number of Beautiful Subarrays (统计美丽子数组数目)
- 6319. Number of Even and Odd Bits (奇偶位数)
- 6322. Check Knight Tour Configuration (检查骑士巡视方案)
- 6352. The Number of Beautiful Subsets (美丽子集的数目)
- 6249. Minimum cuts to divide a circle (分割圆的最少切割次数)
- 6250. Minimum penalty for a shop (商店的最少代价)
- 6277. Difference between ones and zeros in row and column (行和列中一和零的差值)
- 6261. Maximum Value of a String in an Array (数组中字符串的最大值)
- 6262. Maximum Star Sum of a Graph (图中最大星和)
- 6263. Frog Jump II (青蛙过河 II)
- 6273. Maximum Enemy Forts That Can Be Captured (最多可以摧毁的敌人城堡数目)
- 6274. Reward Top K Students (奖励最顶尖的 K 名学生)
- 6287. Categorize Box According to Criteria (根据规则将箱子分类)
- 6288. Find Consecutive Integers from a Data Stream (找到数据流中的连续整数)
- 6289. Find Xor-Beauty of Array (查询数组 Xor 美丽值)
- 6303. Separate the Digits in an Array (分割数组中数字的数位)
- 6304. Maximum Number of Integers to Choose From a Range I (从一个范围内选择最多整数 I)
- 6359. Maximum Difference by Remapping a Digit (替换一个数字后的最大差值)
- 6361. Minimum Score by Changing Two Elements (修改两个元素的最小分数)
- 6323. Distribute Money to Maximum Children (将钱分给最多的儿童)
- 6324. Maximize Greatness of an Array (最大化数组的伟大值)
- 46. Permutations (全排列) -
Backtracking (回溯)
- 47. Permutations II (全排列 II) -
Backtracking (回溯)
- 17. Letter Combinations of a Phone Number (电话号码的字母组合) -
Backtracking (回溯)
- 39. Combination Sum (组合总和) -
Backtracking (回溯)
- 40. Combination Sum II (组合总和 II) -
Backtracking (回溯)
- 216. Combination Sum III (组合总和 III) -
Backtracking (回溯)
- 77. Combinations (组合) -
Backtracking (回溯)
- 78. Subsets (子集) -
Backtracking (回溯)
- 90. Subsets ii (子集 II) -
Backtracking (回溯)
- 117.populating-next-right-pointers-in-each-node-ii.c
- 117.populating-next-right-pointers-in-each-node-ii-slow.cpp
- 117.populating-next-right-pointers-in-each-node-ii.cpp