[leetcode]1. Two Sum两数之和 |
Two Pointers, HashMap |
Easy |
[leetcode]2. Add Two Numbers两数相加 |
Math, LinkedList |
Medium |
[leetcode]3. Longest Substring Without Repeating Characters无重复字母的最长子串 |
Sliding Window |
Medium |
[leetcode]4. Median of Two Sorted Arrays俩有序数组的中位数 |
Merge Sort, Binary Search |
Hard |
[leetcode]5. Longest Palindromic Substring最长回文子串 |
Dynamic Programming, Manacher |
Medium |
[leetcode]6. ZigZag Conversion字符串Z形排列 |
String |
Medium |
[leetcode]7. Reverse Integer反转整数 |
Math |
Easy |
[leetcode]8. String to Integer (atoi)字符串转整数 |
Math |
Medium |
[leetcode]9. Palindrome Number 回文数 |
Math |
Easy |
[leetcode]10. Regular Expression Matching正则表达式的匹配 |
Dynamic Programming |
Hard |
[leetcode]11. Container With Most Water存水最多的容器 |
Two Pointers |
Easy |
[leetcode]12. Integer to Roman整数转罗马数字 |
String |
Easy |
[leetcode]13. Roman to Integer罗马数字转整数 |
String |
Easy |
[leetcode]14. Longest Common Prefix 最长公共前缀 |
String |
Easy |
[leetcode]15. 3Sum三数之和 |
K Sum |
Medium |
[leetcode]16. 3Sum Closest最接近的三数之和 |
K Sum |
Medium |
[leetcode]17. Letter Combinations of a Phone Number手机键盘的字母组合 |
Backtracking |
Medium |
[leetcode]18. 4Sum四数之和 |
K Sum |
Medium |
[leetcode]19. Remove Nth Node From End of List删除链表倒数第N个节点 |
LinkedList |
Easy |
[leetcode]20. Valid Parentheses有效括号序列 |
Stack |
Easy |
[leetcode]21. Merge Two Sorted Lists合并两个链表 |
Merge Sort |
Easy |
[leetcode]22. Generate Parentheses生成括号 |
Backtracking |
Medium |
[leetcode]23. Merge k Sorted Lists归并k个有序链表 |
PriorityQueue |
Medium |
[leetcode]24. Swap Nodes in Pairs交换节点对 |
LinkedList |
Easy |
[leetcode]25. Reverse Nodes in k-Group每k个节点反转一下 |
LinkedList |
Hard |
[leetcode]26. Remove Duplicates from Sorted Array有序数组去重(单个元素只出现一次) |
Two Pointers |
Easy |
[leetcode]27. Remove Element删除元素 |
Two Pointers |
Easy |
[leetcode]28. Implement strStr()实现strStr() |
Two Pointers |
Easy |
[leetcode]29. Divide Two Integers两整数相除 |
Math |
Medium |
[leetcode]30. Substring with Concatenation of All Words由所有单词连成的子串 |
Sliding Window |
Hard |
[leetcode]31. Next Permutation 下一个排列 |
Array |
Medium |
[leetcode]32. Longest Valid Parentheses最长合法括号子串 |
Stack, Two Pointers |
Medium |
[leetcode]33. Search in Rotated Sorted Array旋转过有序数组里找目标值 |
Binary Search |
Medium |
[leetcode]34.Find First and Last Position of Element in Sorted Array找区间 |
Binary Search |
Medium |
[leetcode]35. Search Insert Position寻找插入位置 |
Binary Search |
Easy |
[leetcode]36. Valid Sudoku验证数独 |
HashMap |
Medium |
[leetcode]37. Sudoku Solver 解数独 |
Backtracking |
Hard |
[leetcode]38. Count and Say数数 |
String |
Easy |
[leetcode]39. Combination Sum组合之和 |
Backtracking |
Medium |
[leetcode]40. Combination Sum II组合之和之二 |
Backtracking |
Medium |
[leetcode]41. First Missing Positive第一个未出现的正数 |
Bucket Sort |
Hard |
[leetcode]42. Trapping Rain Water雨水积水问题 |
Two Pointers |
Medium |
[leetcode]43. Multiply Strings高精度乘法 |
Math |
Medium |
[leetcode]44. Wildcard Matching万能符匹配 |
Dynamic Programming |
Hard |
[leetcode]45. Jump Game II青蛙跳(跳到终点最小步数) |
Greedy |
Hard |
[leetcode]46. Permutations全排列(给定序列无重复元素) |
Backtracking |
Medium |
[leetcode]47. Permutations全排列(给定序列有重复元素) |
Backtracking |
Medium |
[leetcode]48. Rotate Image旋转图像 |
Array |
Medium |
[leetcode]49. Group Anagrams变位词归类 |
HashMap |
Medium |
[leetcode]50. Pow(x, n)求幂 |
Binary Search |
Medium |
[leetcode]51. N-QueensN皇后 |
Backtracking |
Hard |
[leetcode]52. N-Queens II N皇后 |
Backtracking |
Hard |
[leetcode]53. Maximum Subarray最大子数组和 |
Dynamic Programming |
Easy |
[leetcode]54. Spiral Matrix螺旋矩阵 |
Array |
Medium |
[leetcode]55. Jump Game青蛙跳(能否跳到终点) |
Greedy |
Medium |
[leetcode]56. Merge Intervals归并区间 |
Sort |
Medium |
[leetcode]57. Insert Interval插入区间 |
Sort |
Hard |
[leetcode]58. Length of Last Word最后一个词的长度 |
String |
Easy |
[leetcode]59. Spiral Matrix II螺旋遍历矩阵2 |
Array |
Medium |
[leetcode]60. Permutation Sequence排列序列 |
Math |
Medium |
[leetcode]61. Rotate List旋转链表 |
Linked List |
Medium |
[leetcode]62. Unique Paths 不同路径 |
Dynamic Programming |
Medium |
[leetcode]63. Unique Paths II(有障碍物求路径和) |
DFS |
Medium |
[leetcode]64. Minimum Path Sum最小路径和 |
Dynamic Programming |
Medium |
[leetcode]65. Valid Number 有效数值 |
String |
Medium |
[leetcode]66. Plus One加一 |
Array |
Easy |
[leetcode]67. Add Binary 二进制加法 |
String |
Easy |
[leetcode]68. Text Justification文字对齐 |
String |
Hard |
[leetcode]69. Sqrt(x)开方 |
Binary Search |
Medium |
[leetcode]70. Climbing Stairs爬楼梯 |
Dynamic Programming |
Easy |
[leetcode]71. Simplify Path简化路径 |
Stack |
Medium |
[leetcode]72. Edit Distance 最少编辑步数 |
Dynamic Programming |
Hard |
[leetcode]73. Set Matrix Zeroes矩阵置0 |
Array |
Medium |
[leetcode]74. Search a 2D Matrix二维矩阵查找 |
Binary Search |
Medium |
[leetcode]75. Sort Colors三色排序 |
Sort |
Medium |
[leetcode]76. Minimum Window Substring最小字符串窗口 |
Sliding Window |
Hard |
[leetcode]77. Combinations组合 |
Backtracking |
Medium |
[leetcode]78. Subsets数组子集 |
Backtracking |
Medium |
[leetcode]79. Word Search找单词 |
Backtracking |
Medium |
[leetcode]80. Remove Duplicates from Sorted Array II有序数组去重(单个元素可出现两次) |
Array |
Easy |
[leetcode]81. Search in Rotated Sorted Array II旋转过有序数组里找目标值II(有重) |
Array |
Medium |
[leetcode]82. Remove Duplicates from Sorted List II有序链表去重(有重删光) |
Linked List |
Medium |
[leetcode]83. Remove Duplicates from Sorted List有序链表去重(有重去重) |
Linked List |
Easy |
[leetcode]84. Largest Rectangle in Histogram直方图中的最大矩形 |
Stack |
Medium |
[leetcode]85. Maximal Rectangle 最大矩形 |
Stack |
Medium |
[leetcode]86. Partition List划分链表 |
Linked List |
Medium |
[leetcode]87. Scramble String字符串树形颠倒匹配 |
String |
Medium |
[leetcode]88. Merge Sorted Array归并有序数组 |
Merge Sort |
Easy |
[leetcode]90. Subsets II数组子集(有重) |
Backtracking |
Medium |
[leetcode]91. Decode Ways解码方法 |
|
|
[leetcode]92. Reverse Linked List II反转链表2 |
Linked List |
Medium |
[leetcode]93. Restore IP Addresses还原IP地址 |
|
|
[leetcode]94. Binary Tree Inorder Traversal二叉树中序遍历 |
DFS |
Easy |
[leetcode]95. Unique Binary Search Trees II给定节点形成不同BST的集合 |
Dynamic Programming |
Medium |
[leetcode]96. Unique Binary Search Trees给定节点形成不同BST的个数 |
Dynamic Programming |
Medium |
[leetcode]97. Interleaving String能否构成交错字符串 |
Dynamic Programming |
Medium |
[leetcode]98. Validate Binary Search Tree验证二叉搜索树 |
DFS |
Medium |
[leetcode]99. Recover Binary Search Tree恢复二叉搜索树 |
DFS |
Medium |
[leetcode]100. Same Tree相同的树 |
DFS |
Easy |
[leetcode]101. Symmetric Tree对称树 |
DFS |
Easy |
[leetcode]102. Binary Tree Level Order Traversal二叉树水平遍历 |
BFS |
Medium |
[leetcode]103. Binary Tree Zigzag Level Order Traversal二叉树Z形遍历 |
BFS |
Easy |
[leetcode]104. Maximum Depth of Binary Tree二叉树最大深度 |
DFS |
Easy |
105 |
|
|
106 |
|
|
107 |
|
|
108 |
|
|
109 |
|
|
110 |
|
|
111 |
|
|
[leetcode]112. Path Sum路径和(是否有路径) |
DFS |
Easy |
[leetcode]113. Path Sum II路径和(返回路径) |
Backtracking |
Medium |
[leetcode]114. Flatten Binary Tree to Linked List将二叉树展成一个链表 |
DFS |
Medium |
[leetcode]115. Distinct Subsequences 计算不同子序列个数 |
DP |
Medium |
116 |
|
|
[leetcode]117. Populating Next Right Pointers in Each NodeII用next填充同层相邻节点 |
|
|
118 |
|
|
119 |
|
|
120 |
|
|
[leetcode]121. Best Time to Buy and Sell Stock 最佳炒股时机 |
|
|
[leetcode]122. Best Time to Buy and Sell Stock II 最佳炒股时机之二 |
|
|
[leetcode]123. Best Time to Buy and Sell Stock III 最佳炒股时机之三 |
|
|
[leetcode]124. Binary Tree Maximum Path Sum二叉树最大路径和 |
|
|
[leetcode]125. Valid Palindrome判断回文串 |
Two Pointers |
Easy |
[leetcode]126. Word Ladder II单词接龙II |
DFS + BFS |
Hard |
[leetcode]127. Word Ladder单词接龙 |
BFS |
Medium |
[leetcode]128. Longest Consecutive Sequence最长连续序列 |
HashSet |
|
129 |
|
|
130 |
|
|
[leetcode]131. Palindrome Partitioning字符串分割成回文子串 |
Backtracking |
Medium |
132 |
|
|
[leetcode]133. Clone Graph 克隆图 |
Graph |
Medium |
[leetcode]134. Gas Station加油站 |
Greedy |
Medium |
135 |
|
|
136 |
|
|
137 |
|
|
[leetcode]138. Copy List with Random Pointer复制带随机指针的链表 |
Graph |
Medium |
[leetcode]139. Word Break单词能否拆分 |
DP |
Medium |
140 |
|
|
[leetcode]141. Linked List Cycle判断链表是否循环 |
Two Pointers |
Easy |
[leetcode]142. Linked List Cycle II找出循环链表的入口 |
Two Pointers |
Medium |
[leetcode]143. Reorder List重排链表 |
Linked List |
Medium |
144 |
|
|
145 |
|
|
[leetcode]146. LRU Cache实现LRU缓存 |
HashMap + Doubly Linked List |
|
147 |
|
|
148 |
|
|
[leetcode]149. Max Points on a Line多点共线 |
HashMap |
Hard |
[leetcode]150. Evaluate Reverse Polish Notation逆波兰表示法 |
Stack |
Easy |
[leetcode]151. Reverse Words in a String翻转给定字符串中的单词 |
String |
Easy |
[leetcode]152. Maximum Product Subarray最大乘积子数组 |
DP |
Medium |
[leetcode]153. Find Minimum in Rotated Sorted Array旋转过有序数组里找最小 |
Binary Search |
Medium |
154 |
|
|
[leetcode]155. Min Stack最小栈 |
Stack |
Easy |
[leetcode]156.Binary Tree Upside Down颠倒二叉树 |
Tree |
Medium |
[leetcode]158. Read N Characters Given Read4 II - Call multiple times 用Read4读取N个字符2 - 调用多次 |
|
|
[leetcode]159. Longest Substring with At Most Two Distinct Characters至多包含两种字符的最长子串 |
|
|
[leetcode]160. Intersection of Two Linked Lists两链表交点 |
Linked List |
|
[leetcode]161. One Edit Distance编辑步数为一 |
|
|
162 |
|
|
[leetcode]163. Missing Ranges缺失范围 |
|
|
164 |
|
|
165 |
|
|
166 |
|
|
[Leetcode]167. Two Sum II - Input array is sorted 两数之和II |
K Sum |
Easy |
168 |
|
|
169 |
|
|
[leetcode]170. Two Sum III - Data structure design两数之和III |
|
|
171 |
|
|
172 |
|
|
[leetcode]173. Binary Search Tree Iterator 二叉搜索树迭代器 |
|
|
[leetcode]174. Dungeon Game地牢游戏 |
|
|
175 |
|
|
176 |
|
|
177 |
|
|
178 |
|
|
[leetcode]179. Largest Number最大数 |
|
|
180 |
|
|
181 |
|
|
182 |
|
|
183 |
|
|
184 |
|
|
185 |
|
|
186 |
|
|
[leetcode]187. Repeated DNA Sequences重复DNA序列 |
|
|
|
|
|
|
|
|
[leetcode]198. House Robber小偷抢钱 |
|
|
[leetcode]199. Binary Tree Right Side View二叉树右侧视角 |
|
|
[leetcode]200. Number of Islands岛屿个数 |
|
|
[leetcode]253. Meeting Rooms II 会议室II |
Heap |
Medium |
[leetcode]259. 3Sum Smaller 三数之和小于目标值 |
K Sum |
Easy |
[leetcode]295. Find Median from Data Stream数据流的中位数 |
Heap |
Medium |
[Leetcode]703. Kth Largest Element in a Stream 数据流中的第 K 大元素 |
Heap |
Easy |
[leetcode]973. K Closest Points to Origin 离原点距离最近的K个点 |
Heap |
Medium |