
Leetcode 前 300 题算法题解析(Java)
Leetcode 前 300 题 算法题解,leetcode 顺序刷题,详细通俗题解,with JAVA 。
248人已学习
目录
- Introduction 345 浏览
- leetcode 100 斩!回顾 186 浏览
- leetcode 力扣刷题 1 到 300 的感受 202 浏览
- 1. Two Sum 210 浏览
- 2. Add Two Numbers 219 浏览
- 3. Longest Substring Without Repeating Characters 174 浏览
- 4*. Median of Two Sorted Arrays 148 浏览
- 5*. Longest Palindromic Substring 160 浏览
- 6. ZigZag Conversion 192 浏览
- 7. Reverse Integer 155 浏览
- 8. String to Integer 137 浏览
- 9. Palindrome Number 183 浏览
- 10. Regular Expression Matching 171 浏览
- 11. Container With Most Water 145 浏览
- 12. Integer to Roman 165 浏览
- 13. Roman to Integer 177 浏览
- 14. Longest Common Prefix 146 浏览
- 15. 3Sum 151 浏览
- 16. 3Sum Closest 189 浏览
- 17. Letter Combinations of a Phone Number 142 浏览
- 18. 4Sum 188 浏览
- 19. Remove Nth Node From End of List 168 浏览
- 20. Valid Parentheses 168 浏览
- 21. Merge Two Sorted Lists 156 浏览
- 22. Generate Parentheses 144 浏览
- 23. Merge k Sorted Lists 164 浏览
- 24. Swap Nodes in Pairs 200 浏览
- 25. Reverse Nodes in k-Group 133 浏览
- 26. Remove Duplicates from Sorted Array 185 浏览
- 27. Remove Element 146 浏览
- 28. Implement strStr() 152 浏览
- 29. Divide Two Integers 138 浏览
- 30. Substring with Concatenation of All Words 146 浏览
- 31. Next Permutation 148 浏览
- 32. Longest Valid Parentheses 203 浏览
- 33. Search in Rotated Sorted Array 171 浏览
- 34. Find First and Last Position of Element in Sorted Array 220 浏览
- 35. Search Insert Position 166 浏览
- 36. Valid Sudoku 160 浏览
- 37. Sudoku Solver 145 浏览
- 38. Count and Say 110 浏览
- 39. Combination Sum 207 浏览
- 40. Combination Sum II 145 浏览
- 41. First Missing Positive 139 浏览
- 42. Trapping Rain Water 201 浏览
- 43. Multiply Strings 192 浏览
- 44. Wildcard Matching 132 浏览
- 45. Jump Game II 166 浏览
- 46. Permutations 172 浏览
- 47. Permutations II 142 浏览
- 48. Rotate Image 154 浏览
- 49. Group Anagrams 172 浏览
- 50*. Pow(x, n) 142 浏览
- 51. N-Queens 150 浏览
- 52. N-Queens II 163 浏览
- 53. Maximum Subarray 155 浏览
- 54. Spiral Matrix 215 浏览
- 55. Jump Game 130 浏览
- 56. Merge Intervals 131 浏览
- 57. Insert Interval 142 浏览
- 58. Length of Last Word 136 浏览
- 59. Spiral Matrix II 123 浏览
- 60. Permutation Sequence 186 浏览
- 61. Rotate List 141 浏览
- 62. Unique Paths 120 浏览
- 63. Unique Paths II 160 浏览
- 64. Minimum Path Sum 149 浏览
- 65. Valid Number 167 浏览
- 66. Plus One 180 浏览
- 67. Add Binary 150 浏览
- 68. Text Justification 164 浏览
- 69. Sqrt x 175 浏览
- 70. Climbing Stairs 158 浏览
- 71. Simplify Path 177 浏览
- 72. Edit Distance 141 浏览
- 73. Set Matrix Zeroes 154 浏览
- 74. Search a 2D Matrix 157 浏览
- 75. Sort Colors 186 浏览
- 76. Minimum Window Substring 173 浏览
- 77. Combinations 178 浏览
- 78. Subsets 157 浏览
- 79. Word Search 171 浏览
- 80. Remove Duplicates from Sorted Array II 171 浏览
- 81. Search in Rotated Sorted Array II 129 浏览
- 82. Remove Duplicates from Sorted List II 155 浏览
- 83. Remove Duplicates from Sorted List 195 浏览
- 84. Largest Rectangle in Histogram 156 浏览
- 85. Maximal Rectangle 191 浏览
- 86. Partition List 144 浏览
- 87. Scramble String 145 浏览
- 88. Merge Sorted Array 169 浏览
- 89. Gray Code 175 浏览
- 90. Subsets II 160 浏览
- 91. Decode Ways 172 浏览
- 92. Reverse Linked List II 164 浏览
- 93. Restore IP Addresses 151 浏览
- 94. Binary Tree Inorder Traversal 156 浏览
- 95*. Unique Binary Search Trees II 163 浏览
- 96. Unique Binary Search Trees 149 浏览
- 97. Interleaving String 152 浏览
- 98. Validate Binary Search Tree 162 浏览
- 99. Recover Binary Search Tree 172 浏览
- 100. Same Tree 177 浏览
-
101 题到 200 题
136 浏览
- 101. Symmetric Tree 171 浏览
- 102. Binary Tree Level Order Traversal 153 浏览
- 103. Binary Tree Zigzag Level Order Traversal 154 浏览
- 104. Maximum Depth of Binary Tree 146 浏览
- 105. Construct Binary Tree from Preorder and Inorder Traversal 168 浏览
- 106. Construct Binary Tree from Inorder and Postorder Traversal 172 浏览
- 107. Binary Tree Level Order Traversal II 220 浏览
- 108. Convert Sorted Array to Binary Search Tree 157 浏览
- 109. Convert Sorted List to Binary Search Tree 157 浏览
- 110. Balanced Binary Tree 135 浏览
- 111. Minimum Depth of Binary Tree 143 浏览
- 112. Path Sum 134 浏览
- 113. Path Sum II 138 浏览
- 114. Flatten Binary Tree to Linked List 140 浏览
- 115*. Distinct Subsequences 173 浏览
- 116. Populating Next Right Pointers in Each Node 163 浏览
- 117. Populating Next Right Pointers in Each Node II 136 浏览
- 118. Pascal’s Triangle 136 浏览
- 119. Pascal’s Triangle II 171 浏览
- 120. Triangle 147 浏览
- 121. Best Time to Buy and Sell Stock 127 浏览
- 122. Best Time to Buy and Sell Stock II 192 浏览
- 123*. Best Time to Buy and Sell Stock III 136 浏览
- 124*. Binary Tree Maximum Path Sum 130 浏览
- 125. Valid Palindrome 155 浏览
- 126*. Word Ladder II 167 浏览
- 127. Word Ladder 169 浏览
- 128. Longest Consecutive Sequence 163 浏览
- 129. Sum Root to Leaf Numbers 132 浏览
- 130*. Surrounded Regions 150 浏览
- 131. Palindrome Partitioning 182 浏览
- 132. Palindrome Partitioning II 164 浏览
- 133. Clone Graph 133 浏览
- 134. Gas Station 155 浏览
- 135. Candy 190 浏览
- 136. Single Number 164 浏览
- 137*. Single Number II 184 浏览
- 138. Copy List with Random Pointer 154 浏览
- 139. Word Break 124 浏览
- 140. Word Break II 152 浏览
- 141. Linked List Cycle 160 浏览
- 142. Linked List Cycle II 144 浏览
- 143. Reorder List 149 浏览
- 144. Binary Tree Preorder Traversal 174 浏览
- 145*. Binary Tree Postorder Traversal 142 浏览
- 146. LRU Cache 136 浏览
- 147. Insertion Sort List 170 浏览
- 148. Sort List 151 浏览
- 149*. Max Points on a Line 201 浏览
- 150. Evaluate Reverse Polish Notation 154 浏览
- 151. Reverse Words in a String 163 浏览
- 152. Maximum Product Subarray 208 浏览
- 153. Find Minimum in Rotated Sorted Array 148 浏览
- 154*. Find Minimum in Rotated Sorted Array II 133 浏览
- 155. Min Stack 154 浏览
- 160. Intersection of Two Linked Lists 182 浏览
- 162. Find Peak Element 159 浏览
- 164. Maximum Gap 149 浏览
- 165. Compare Version Numbers 194 浏览
- 166. Fraction to Recurring Decimal 174 浏览
- 167. Two Sum II - Input array is sorted 122 浏览
- 168. Excel Sheet Column Title 158 浏览
- 169. Majority Element 147 浏览
- 171. Excel Sheet Column Number 152 浏览
- 172. Factorial Trailing Zeroes 145 浏览
- 173. Binary Search Tree Iterator 131 浏览
- 174*. Dungeon Game 163 浏览
- 179. Largest Number 154 浏览
- 187. Repeated DNA Sequences 144 浏览
- 188. Best Time to Buy and Sell Stock IV 226 浏览
- 189. Rotate Array 124 浏览
- 190. Reverse Bits 187 浏览
- 191. Number of 1 Bits 163 浏览
- 198. House Robber 179 浏览
- 199. Binary Tree Right Side View 197 浏览
- 200. Number of Islands 152 浏览
-
201 题到 300 题
233 浏览
- 201. Bitwise AND of Numbers Range 133 浏览
- 202. Happy Number 168 浏览
- 203. Remove Linked List Elements 149 浏览
- 204. Count Primes 193 浏览
- 205. Isomorphic Strings 140 浏览
- 206. Reverse Linked List 140 浏览
- 207. Course Schedule 176 浏览
- 208. Implement Trie(Prefix Tree) 156 浏览
- 209. Minimum Size Subarray Sum 137 浏览
- 210. Course Schedule II 154 浏览
- 211. Add and Search Word - Data structure design 125 浏览
- 212. Word Search II 177 浏览
- 213. House Robber II 157 浏览
- 214*. Shortest Palindrome 167 浏览
- 215. Kth Largest Element in an Array 144 浏览
- 216. Combination Sum III 144 浏览
- 217. Contains Duplicate 160 浏览
- 218. The Skyline Problem 162 浏览
- 219. Contains Duplicate II 153 浏览
- 220*. Contains Duplicate III 148 浏览
- 221. Maximal Square 159 浏览
- 222. Count Complete Tree Nodes 150 浏览
- 223. Rectangle Area 147 浏览
- 224*. Basic Calculator 179 浏览
- 225. Implement Stack using Queues 277 浏览
- 226. Invert Binary Tree 150 浏览
- 227. Basic Calculator II 172 浏览
- 228. Summary Ranges 163 浏览
- 229. Majority Element II 155 浏览
- 230. Kth Smallest Element in a BST 152 浏览
- 231*. Power of Two 215 浏览
- 232. Implement Queue using Stacks 155 浏览
- 233. Number of Digit One 170 浏览
- 234. Palindrome Linked List 180 浏览
- 235. Lowest Common Ancestor of a Binary Search Tree 116 浏览
- 236. Lowest Common Ancestor of a Binary Tree 146 浏览
- 237. Delete Node in a Linked List 118 浏览
- 238. Product of Array Except Self 159 浏览
- 239. Sliding Window Maximum 129 浏览
- 240. Search a 2D Matrix II 177 浏览
- 241. Different Ways to Add Parentheses 167 浏览
- 242. Valid Anagram 182 浏览
- 257. Binary Tree Paths 147 浏览
- 258. Add Digits 204 浏览
- 260. Single Number III 128 浏览
- 263. Ugly Number 145 浏览
- 264. Ugly Number II 185 浏览
- 268. Missing Number 162 浏览
- 273. Integer to English Words 144 浏览
- 274. H-Index 137 浏览
- 275. H-Index II 127 浏览
- 278. First Bad Version 126 浏览
- 279. Perfect Squares 162 浏览
- 282. Expression Add Operators 135 浏览
- 283. Move Zeroes 147 浏览
- 284. Peeking Iterator 161 浏览
- 287*. Find the Duplicate Number 117 浏览
- 289*. Game of Life 188 浏览
- 290. Word Pattern 163 浏览
- 292*. Nim Game 148 浏览
- 295*. Find Median from Data Stream 162 浏览
- 297. Serialize and Deserialize Binary Tree 126 浏览
- 299. Bulls and Cows 165 浏览
- 300. Longest Increasing Subsequence 138 浏览
- 更多 159 浏览