LeetCode Solution
目录
目录
1. Two Sum
2. Add Two Numbers
3. Longest Substring Without Repeating Characters
4. Median of Two Sorted Arrays
5. Longest Palindromic Substring
6. ZigZag Conversion
7. Reverse Integer
8. String to Integer (atoi)
9. Palindrome Number
10. Regular Expression Matching
11. Container With Most Water
12. Integer to Roman
13. Roman to Integer
14. Longest Common Prefix
15. 3Sum
16. 3Sum Closest
17. Letter Combinations of a Phone Number
18. 4Sum
19. Remove Nth Node From End of List
20. Valid Parentheses
21. Merge Two Sorted Lists
22. Generate Parentheses
23. Merge k Sorted Lists
24. Swap Nodes in Pairs
25. Reverse Nodes in k-Group
26. Remove Duplicates from Sorted Array
27. Remove Element
28. Implement strStr()
29. Divide Two Integers
30. Substring with Concatenation of All Words
31. Next Permutation
32. Longest Valid Parentheses
33. Search in Rotated Sorted Array
34. Search for a Range
35. Search Insert Position
36. Valid Sudoku
37. Sudoku Solver
38. Count and Say
39. Combination Sum
40. Combination Sum II
41. First Missing Positive
42. Trapping Rain Water
43. Multiply Strings
44. Wildcard Matching
45. Jump Game II
46. Permutations
47. Permutations II
48. Rotate Image
49. Group Anagrams
50. Pow(x, n)
51. N-Queens
52. N-Queens II
53. Maximum Subarray(连续子数组的最大和问题)
54. Spiral Matrix
55. Jump Game
56. Merge Intervals
57. Insert Interval
58. Length of Last Word
59. Spiral Matrix II
60. Permutation Sequence
61. Rotate List
62. Unique Paths
63. Unique Paths II
64. Minimum Path Sum
65. Valid Number
66. Plus One
67. Add Binary
68. Text Justification
69. Sqrt(x)
70. Climbing Stairs
76. Minimum Window Substring
77. Combinations
78. Subsets
80. Remove Duplicates from Sorted Array II
81. Search in Rotated Sorted Array II
82. Remove Duplicates from Sorted List II
83. Remove Duplicates from Sorted List
86. Partition List
88. Merge Sorted Array
90. Subsets II
92. Reverse Linked List II
93. Restore IP Addresses
94. Binary Tree Inorder Traversal
95. Unique Binary Search Trees II
96. Unique Binary Search Trees
98. Validate Binary Search Tree
100. Same Tree
101. Symmetric Tree
104. Maximum Depth of Binary Tree
105. Construct Binary Tree from Preorder and Inorder Traversal
109. Convert Sorted List to Binary Search Tree
110. Balanced Binary Tree
111. Minimum Depth of Binary Tree
113. Path Sum II
121. Best Time to Buy and Sell Stock
122. Best Time to Buy and Sell Stock II
123. Best Time to Buy and Sell Stock III
125. Valid Palindrome
136. Single Number
137. Single Number II
141. Linked List Cycle
142. Linked List Cycle II
144. Binary Tree Preorder Traversal
145. Binary Tree Postorder Traversal
146. LRU Cache
147. Insertion Sort List
148. Sort List
153. Find Minimum in Rotated Sorted Array
154. Find Minimum in Rotated Sorted Array II
160. Intersection of Two Linked Lists
168. Excel Sheet Column Title
171. Excel Sheet Column Number
173. Binary Search Tree Iterator
175. Combine Two Tables
181. Employees Earning More Than Their Managers
182. Duplicate Emails
187. Repeated DNA Sequences
189. Rotate Array
190. Reverse Bits
191. Number of 1 Bits
201. Bitwise AND of Numbers Range
203. Remove Linked List Elements
204. Count Primes
205. Isomorphic Strings
206. reverse-linked-list
207. Course Schedule
208. Implement Trie (Prefix Tree)
209. Minimum Size Subarray Sum
210. Course Schedule II
211. Add and Search Word - Data structure design
212. Word Search II
215. Kth Largest Element in an Array
219. Contains Duplicate II
225. Implement Stack using Queues
226. Invert Binary Tree
230. Kth Smallest Element in a BST
231. Power of Two
232. Implement Queue using Stacks
234. Palindrome Linked List
235. Lowest Common Ancestor of a Binary Search Tree
236. Lowest Common Ancestor of a Binary Tree
237. Delete Node in a Linked List
240. Search a 2D Matrix II
242. Valid Anagram
257. Binary Tree Paths
260. Single Number III
263. Ugly Number
264. Ugly Number II
268. Missing Number
283. Move Zeroes
284. Peeking Iterator
290. Word Pattern
297. Serialize and Deserialize Binary Tree
300. Longest Increasing Subsequence
307. Range Sum Query - Mutable
313. Super Ugly Number
326. Power of Three
328. Odd Even Linked List
336. Palindrome Pairs
337. House Robber III
341. Flatten Nested List Iterator
342. Power of Four
344. Reverse String
345. Reverse Vowels of a String
349. Intersection of Two Arrays
350. Intersection of Two Arrays II
367. Valid Perfect Square
371. Sum of Two Integers
377. Combination Sum IV
389. Find the Difference
392. Is Subsequence
397. Integer Replacement
398. Random Pick Index
405. Convert a Number to Hexadecimal
415. Add Strings
421. Maximum XOR of Two Numbers in an Array
435. Non-overlapping Intervals
438. Find All Anagrams in a String
442. Find All Duplicates in an Array
445. Add Two Numbers II
448. Find All Numbers Disappeared in an Array
450. Delete Node in a BST
452. Minimum Number of Arrows to Burst Balloons
454. 4Sum II
459. Repeated Substring Pattern
460. LFU Cache
461. Hamming Distance
476. Number Complement
477. Total Hamming Distance
515. Find Largest Value in Each Tree Row
538. Convert BST to Greater Tree
541. Reverse String II
542. 01 Matrix
557. Reverse Words in a String III
566. Reshape the Matrix
620. Not Boring Movies
627. Swap Salary
633. Sum of Square Numbers
648. Replace Words
653. Two Sum IV - Input is a BST
677. Map Sum Pairs
686. Repeated String Match
687. Longest Univalue Path
690. Employee Importance
693. Binary Number with Alternating Bits
717. 1-bit and 2-bit Characters
720. Longest Word in Dictionary
746. Min Cost Climbing Stairs
762. Prime Number of Set Bits in Binary Representation
783. Minimum Distance Between BST Nodes
784. Letter Case Permutation
792. Number of Matching Subsequences
819. Most Common Word
824. Goat Latin
840. Magic Squares In Grid
填写
LeetCode Solution
Docs
»
目录
Edit on GitHub
目录
这个网站记录了我在 2018 年刷 LeetCode 的时候的一些题解,主要使用 Java,部分题目使用了 Python。
GitHub
Next »