目录
一,数组
二,字符串
三,链表
四,队列
五,排序
六,栈
七,二叉树
八,堆
一,数组
| 编号 | 题目 | 题解 | 标签 | 难度 |
|---|---|---|---|---|
| 1 | 54. Spiral Matrix | LeetCode_Array_54 | 【找规律, C++】 | |
| 2 | 55. Jump Game | LeetCode_Array_55 | 【找规律, C++】 | |
| 3 | 56. Merge Intervals | LeetCode_Array_56 | 【C++】 | |
| 4 | 62. Unique Paths | LeetCode_Array_62 | 【C++】 | |
| 5 | 63. Unique Paths II | LeetCode_Array_63 | 【C++】 | |
| 6 | 64. Minimum Path Sum | LeetCode_Array_64 | 【C++】 | |
| 7 | 73. Set Matrix Zeroes | LeetCode_Array_73 | 【C++】 | |
| 8 | 74. Search a 2D Matrix | LeetCode_Array_74 | 【C++】 | |
| 9 | 75. Sort Colors 颜色分类 | LeetCode_Array_75 | 【C++】 | |
| 10 | 78. Subsets 求集合的所有子集 | LeetCode_Array_78 | 【C++】 | |
| 11 | 79. Word Search | LeetCode_Array_79 | 【C++】 | |
| 12 | 48. Rotate Image | LeetCode_Array_48 | 【C++】 | |
| 13 | 53. Maximum Subarray | LeetCode_Array_53 | 【C++】 | |
| 14 | 80. Remove Duplicates from Sorted Array II | LeetCode_Array_80 | 【C++】 | |
| 15 | 33. Search in Rotated Sorted Array | LeetCode_Array_33 | 【C++】 | |
| 16 | 84. Largest Rectangle in Histogram柱状图中最大的矩形 | LeetCode_Array_84 | 【C++】 | |
| 17 | 85. Maximal Rectangle最大矩形 | LeetCode_Array_85 | 【C++】【单调栈】 | |
| 18 | 90. Subsets II子集 II | LeetCode_Array_90 | 【C++】【递归+剪枝】 | |
| 19 | 105. Construct Binary Tree from Preorder and Inorder Traversal先序+中序构建二叉树 | LeetCode_Array_105 | 【C++】【构建二叉树】 | |
| 20 | 119. Pascal‘s Triangle杨辉三角I/II | LeetCode_Array_119 | 【C++】【动态规划】 | |
| 21 | 120. Triangle三角形最小路径和 | LeetCode_Array_120 | 【C++】【动态规划】 | |
| 22 | 121. Best Time to Buy and Sell Stock买卖股票的最佳时机 | LeetCode_Array_121 | 【C++】 | |
| 23 | 122. Best Time to Buy and Sell Stock II买股票的最佳时机 II | LeetCode_Array_122 | 【C++】 | |
| 24 | 123. Best Time to Buy and Sell Stock III买卖股票的最佳时机III | LeetCode_Array_123 | 【C++】 | |
| 25 | 126. Word Ladder II单词接龙II | LeetCode_Array_126 | 【C++】【双向BFS构图+DFS寻找路径】 | |
| 26 | 128. Longest Consecutive Sequence最长连续序列 | LeetCode_Array_128 | 【C++】【并查集】 | |
| 27 | 152. Maximum Product Subarray乘积最大子数组 | LeetCode_Array_152 | 【C++/Java】 | |
| 28 | 153. Find Minimum in Rotated Sorted Array寻找旋转排序数组中的最小值 | LeetCode_Array_153 | 【C++/Java】 | |
| 29 | 154. Find Minimum in Rotated Sorted Array II寻找旋转排序数组中的最小值 II | LeetCode_Array_154 | 【C++/Java】 | |
| 30 | 162. Find Peak Element寻找峰值 | LeetCode_Array_162 | 【C++/Java】 | |
| 31 | 167. Two Sum II - Input array is sorted两数之和 II - 输入有序数组 | LeetCode_Array_167 | 【C++/Java】 | |
| 32 | 189. Rotate Array 旋转数组 | LeetCode_Array_189 | 【C++/Java】 | |
| 33 | 209. Minimum Size Subarray Sum 长度最小的子数组 | LeetCode_Array_209 | 【C++/Java】 | |
| 34 | 216. Combination Sum III 组合总和 III | LeetCode_Array_216 | 【C++/Java】 | |
| 35 | 219. Contains Duplicate II 存在重复元素 II | LeetCode_Array_219 | 【C++/Java】 | |
| 36 | 228. Summary Ranges 汇总区间 | LeetCode_Array_228 | 【C++/Java】 | |
| 37 | 229. Majority Element II 求众数 II | LeetCode_Array_229 | 【C++/Java】【摩尔投票法】 | |
| 38 | 238. Product of Array Except Self 除自身以外数组的乘积 | LeetCode_Array_238 | 【C++/Java】 | |
| 39 | 287. Find the Duplicate Number 寻找重复数 | LeetCode_Array_287 | 【C++/Java】【二分法、快慢指针】 | |
| 40 | 289. Game of Life 生命游戏 | LeetCode_Array_289 | 【C++/Java】【原地算法】 | |
| 41 |
二,字符串
| 编号 | 题目 | 题解 | 标签 | 难度 |
|---|---|---|---|---|
| 1 | 3. Longest Substring Without Repeating Characters不含有重复字符的最长子串 | LeetCode_String_3 | 【C++】 | |
| 2 | 5. Longest Palindromic Substring最长回文子串 | LeetCode_String_5 | 【C++】 | |
| 3 | 6. ZigZag Conversion Z 字形变换 | LeetCode_String_6 | 【C++】 | |
| 4 | 12. Integer to Roman 整数转罗马数字 | LeetCode_String_12 | 【C++】 | |
| 5 | 13. Roman to Integer 罗马数字转整数 | LeetCode_String_13 | 【C++】 | |
| 6 | 17. Letter Combinations of a Phone Number 电话号码的字母组合 | LeetCode_String_17 | 【C++】 | |
| 7 | 22. Generate Parentheses 括号生成 | LeetCode_String_22 | 【C++/Java】【DFS、剪枝、括号匹配】 | |
| 8 | 28. Implement strStr() 实现 strStr() | LeetCode_String_28 | 【C++/Java】【字符串匹配,Sunday算法,KMP算法】 | |
| 9 | 859. Buddy Strings 亲密字符串 | LeetCode_String_859 | 【C++】 | |
| 10 | 844. Backspace String Compare 比较含退格的字符串 | LeetCode_String_844 | 【Java】【双指针,找规律】 | |
| 11 | ||||
| 12 |
三,链表
| 编号 | 题目 | 题解 | 标签 | 难度 |
|---|---|---|---|---|
| 1 | 141. linked List Cycle 环形链表 | LeetCode_linkedList_141 | 【C++/Java】【快慢指针】 | |
| 2 | 142. linked List Cycle II 环形链表 II | LeetCode_linkedList_142 | 【C++/Java】【快慢指针】 | |
| 3 | 202. Happy Number 快乐数 | LeetCode_linkedList_202 | 【C++/Java】【循环链表,快慢指针】 | |
| 4 | 206. Reverse linked List 反转链表 | LeetCode_linkedList_206 | 【C++/Java】【头插法,尾插法,递归】 | |
| 5 | 92. Reverse linked List II 反转链表 II | LeetCode_linkedList_92 | 【C++/Java】【递归】 | |
| 6 | 25. Reverse Nodes in k-Group K 个一组翻转链表 | LeetCode_linkedList_25 | 【C++】【递归、迭代】 | |
| 7 | 19. Remove Nth Node From End of List 删除链表的倒数第 N 个结点 | LeetCode_linkedList_19 | 【C++】【双指针,一次遍历】 | |
| 8 | 82. Remove Duplicates from Sorted List II 删除排序链表中的重复元素 II | LeetCode_linkedList_82 | 【C++】 | |
| 9 | 138. Copy List with Random Pointer 复制带随机指针的链表 | LeetCode_linkedList_138 | 【C++】【原地复制节点】 | |
| 10 | 622. Design Circular Queue 设计循环队列 | LeetCode_Queue_622 | 【C++/Java】 | |
| 11 | 641. Design Circular Deque 设计循环双端队列 | LeetCode_Queue_641 | 【C++】 | |
| 12 | 面试题_17.09. Get Kth Magic Numb | LeetCode_面试题_17.09 | 【C++】 | |
| 13 | ||||
| 14 |
四,队列
五,排序
| 编号 | 题目 | 题解 | 标签 | 难度 |
|---|---|---|---|---|
| 1 | 621. Task Scheduler 任务调度器 | LeetCode_Sorting_621 | 【Java】【找规律,桶思想】 | |
| 2 | 969. Pancake Sorting 煎饼排序 | LeetCode_Sorting_969 | 【Java】 | |
| 3 | ||||
| 4 | ||||
| 5 | ||||
| 6 | ||||
| 7 | ||||
| 8 | ||||
| 9 |
六,栈
| 编号 | 题目 | 题解 | 标签 | 难度 |
|---|---|---|---|---|
| 1 | 946. Validate Stack Sequences 验证栈序列 | LeetCode_Stack_946 | 【Java】【栈,模拟】 | |
| 2 | 1249. Minimum Remove to Make Valid Parentheses 移除无效的括号 | LeetCode_Stack_1249 | 【Java】【栈,字符串处理】 | |
| 3 | 145. Binary Tree Postorder Traversal 二叉树的后序遍历 | LeetCode_Stack_145 | 【Java】【栈,迭代】 | |
| 4 | 331. Verify Preorder Serialization of a Binary Tree 验证二叉树的前序序列化 | LeetCode_Stack_331 | 【Java】【栈,字符串处理】 | |
| 5 | 227. Basic Calculator II 基本计算器 II | LeetCode_Stack_227 | 【Java】【栈,字符串处理】 | |
| 6 | 636. Exclusive Time of Functions 函数的独占时间 | LeetCode_Stack_636 | 【栈,字符串处理】 | |
| 7 | 1124. Longest Well-Performing Interval 表现良好的最长时间段 | LeetCode_Stack_1124 | 【栈】 | 【中等】 |
| 8 | 144. Binary Tree Preorder Traversal 二叉树的前序遍历 | LeetCode_Stack_144 | 【栈,迭代】 | 【简单】 |
| 9 | 589. N-ary Tree Preorder Traversal N 叉树的前序遍历 | LeetCode_Stack_589 | 【栈,迭代】 | 【简单】 |
| 10 | 662. Maximum Width of Binary Tree 二叉树最大宽度 | LeetCode_Queue_662 | 【队列,迭代】 | 【中等】 |
| 11 |
七,二叉树
| 编号 | 题目 | 题解 | 标签 | 难度 |
|---|---|---|---|---|
| 1 | 968. Binary Tree Cameras 监控二叉树 | LeetCode_BinaryTree_968 | 【递归,树形DP】【C++/java】 | 【困难】 |
| 2 | ||||
| 3 | ||||
| 4 | ||||
| 5 |
八,堆
| 编号 | 题目 | 题解 | 标签 | 难度 |
|---|---|---|---|---|
| 1 | 剑指 Offer 40. 最小的k个数 | LeetCode_Heap_剑指 Offer 40 | 【堆,泛型实现,自定义比较器】【C++/java】 | 【简单】 |
| 2 | 703. Kth Largest Element in a Stream 数据流中的第 K 大元素 | LeetCode_Heap_703 | 【堆】【C++/java】 | 【简单】 |
| 3 | 373. Find K Pairs with Smallest Sums 查找和最小的K对数字 | LeetCode_Heap_373 | 【堆】【C++/java】 | 【中等】 |
| 4 | 295. Find Median from Data Stream 数据流的中位数 | LeetCode_Heap_295 | 【堆,中位数】【C++/java】 | 【困难】 |



