从开始这个Github已经有将近两年时间, 很高兴这个repo可以帮到有需要的人. 我一直认为, 知识本身是无价的, 因此每逢闲暇, 我就会来维护这个repo, 给刷题的朋友们一些我的想法和见解. 下面来简单介绍一下这个repo:
README.md: 所有所做过的题目
ReviewPage.md: 所有题目的总结和归纳(不断完善中)
KnowledgeHash2.md: 对所做过的知识点的一些笔记
SystemDesign.md: 对系统设计的一些笔记
Future Milestone: 我准备将一些有意思的题目,做成视频的形式给大家参考
希望大家学习顺利, 对未来充满希望(程序员也是找到好老板的!) 有问题可以给我写邮件([email protected]), 或者在GitHub上发issue给我.
Squence | Problem | Level | Language | Tags | Video Tutorial |
---|---|---|---|---|---|
0 | Binary Tree Zigzag Level Order Traversal.java | Medium | Java | [BFS, Stack, Tree] | |
1 | Count of Smaller Number before itself.java | Hard | Java | [] | |
2 | Count of Smaller Number.java | Review | Java | [Binary Search, Segment Tree] | |
3 | Delete Digits.java | Medium | Java | [] | |
4 | Find the Weak Connected Component in the Directed Graph.java | Medium | Java | [Union Find] | |
5 | Flatten 2D Vector.java | Medium | Java | [Design] | |
6 | Fraction to Recurring Decimal.java | Medium | Java | [Hash Table, Math] | |
7 | Gray Code.java | Medium | Java | [Backtracking] | |
8 | Group Shifted Strings.java | Easy | Java | [] | |
9 | H-Index.java | Medium | Java | [Hash Table, Sort] | |
10 | Hamming Distance.java | Easy | Java | [] | |
11 | Happy Number.java | Easy | Java | [] | |
12 | HashHeap.java | Hard | Java | [] | |
13 | HashWithArray.java | Easy | Java | [] | |
14 | Heapify.java | Review | Java | [Heap] | |
15 | Heaters.java | Easy | Java | [] | |
16 | IndexMatch.java | Easy | Java | [] | |
17 | Inorder Successor in Binary Search Tree.java | Medium | Java | [BST, Tree] | |
18 | Insert Node in a Binary Search Tree .java | Easy | Java | [BST] | |
19 | Intersection of Two Arrays.java | Easy | Java | [] | |
20 | Intersection of Two Linked Lists.java | Easy | Java | [Linked List] | |
21 | Interval Sum II.java | Hard | Java | [] | |
22 | Isomorphic Strings.java | Easy | Java | [] | |
23 | Jewels and Stones.java | Easy | Java | [Hash Table] | |
24 | Kth Largest Element.java | Review | Java | [Divide and Conquer, Heap, Quick Sort] | |
25 | Kth Smallest Sum In Two Sorted Arrays.java | Hard | Java | [] | |
26 | LFU Cache.java | Hard | Java | [Design, Hash Table] | |
27 | Longest Palindromic Substring.java | Review | Java | [DP, String] | |
28 | Longest Univalue Path.java | Easy | Java | [] | |
29 | Majority Number II.java | Medium | Java | [Enumeration, Greedy] | |
30 | Majority Number III.java | Medium | Java | [Hash Table, Linked List] | |
31 | Matrix Zigzag Traversal.java | Easy | Java | [] | |
32 | Maximum Subarray III.java | Review | Java | [] | |
33 | Minimum Absolute Difference in BST.java | Easy | Java | [BST] | |
34 | Minimum Height Trees.java | Medium | Java | [BFS, Graph] | |
35 | Minimum Subarray.java | Easy | Java | [Array, Greedy] | |
36 | Missing Ranges.java | Medium | Java | [Array] | |
37 | Multiply Strings.java | Medium | Java | [Math, String] | |
38 | Next Permutation.java | Medium | Java | [Array] | |
39 | O(1) Check Power of 2.java | Easy | Java | [Bit Manipulation] | |
40 | Paint Fence.java | Easy | Java | [] | |
41 | Palindrome Permutation II.java | Medium | Java | [Backtracking, Permutation] | |
42 | Partition Array by Odd and Even.java | Easy | Java | [Array, Two Pointers] | |
43 | Pascal's Triangle II.java | Easy | Java | [] | |
44 | Permutation Index.java | Easy | Java | [] | |
45 | Permutation Sequence.java | Medium | Java | [Backtracking, Math] | |
46 | Populating Next Right Pointers in Each Node II.java | Hard | Java | [] | |
47 | Product of Array Exclude Itself.java | Medium | Java | [Array] | |
48 | Recover Rotated Sorted Array.java | Easy | Java | [Array] | |
49 | Remove Duplicates from Unsorted List.java | Medium | Java | [Linked List] | |
50 | Remove Invalid Parentheses.java | Hard | Java | [] | |
51 | Remove Node in Binary Search Tree.java | Hard | Java | [BST] | |
52 | Reshape the Matrix.java | Easy | Java | [] | |
53 | Reverse String.java | Easy | Java | [] | |
54 | Roman to Integer.java | Easy | Java | [] | |
55 | Rotate Image.java | Medium | Java | [Array, Enumeration] | |
56 | Search Insert Position.java | Easy | Java | [] | |
57 | Search Rotated in Sorted Array II.java | Medium | Java | [Array, Binary Search] | |
58 | Search Rotated in Sorted Array.java | Hard | Java | [] | |
59 | Shortest Word Distance.java | Easy | Java | [] | |
60 | Single Number II.java | Medium | Java | [Bit Manipulation] | |
61 | Single Number III.java | Medium | Java | [Bit Manipulation] | |
62 | Single Number.java | Easy | Java | [] | |
63 | Sliding Window Maximum.java | Hard | Java | [] | |
64 | Sort Color.java | Medium | Java | [Array, Sort, Two Pointers] | |
65 | Sort Colors II.java | Medium | Java | [Sort, Two Pointers] | |
66 | Sort Letters by Case.java | Medium | Java | [Sort, String, Two Pointers] | |
67 | Space Replacement.java | Medium | Java | [String] | |
68 | Stone Game.java | Medium | Java | [DP] | |
69 | String Permutation.java | Easy | Java | [] | |
70 | String to Integer(atoi).java | Easy | Java | [] | |
71 | Strobogrammatic Number.java | Easy | Java | [] | |
72 | Subarray Sum Closest.java | Medium | Java | [Sort] | |
73 | Subarray Sum II.java | Hard | Java | [Array, Binary Search, Two Pointers] | |
74 | The Smallest Difference.java | Medium | Java | [Array, Sort, Two Pointers] | |
75 | Total Occurrence of Target.java | Medium | Java | [] | |
76 | Trailing Zeros.java | Easy | Java | [Math] | |
77 | Triangles.java | Medium | Java | [Array, DP] | |
78 | Two Lists Sum.java | Medium | Java | [Linked List] | |
79 | Two Strings Are Anagrams.java | Easy | Java | [] | |
80 | Ugly Number II.java | Medium | Java | [DP, Heap, Math] | |
81 | Valid Parentheses.java | Easy | Java | [] | |
82 | Valid Sudoku.java | Easy | Java | [] | |
83 | Word Ladder II.java | Hard | Java | [] | |
84 | Word Pattern.java | Easy | Java | [] | |
85 | Zigzag Iterator.java | Medium | Java | [BST] | |
86 | Find Anagram Mappings.java | Easy | Java | [Hash Table] | |
87 | Judge Route Circle.java | Easy | Java | [String] | |
88 | Island Perimeter.java | Easy | Java | [Hash Table] | |
89 | First Unique Character in a String.java | Easy | Java | [Hash Table, String] | |
90 | Power of Three.java | Easy | Java | [Math] | |
91 | Plus One.java | Easy | Java | [Array, Math] | |
92 | Power of Two.java | Easy | Java | [Bit Manipulation, Math] | |
93 | Reverse Vowels of a String.java | Easy | Java | [String, Two Pointers] | |
94 | Guess Number Higher or Lower.java | Easy | Java | [Binary Search] | |
95 | Encode and Decode TinyURL.java | Medium | Java | [Hash Table, Math] | |
96 | Wiggle Sort.java | Medium | Java | [Array, Sort] | |
97 | Queue Reconstruction by Height.java | Medium | Java | [Greedy] | |
98 | 2 Sum II - Input array is sorted.java | Medium | Java | [Array, Binary Search, Two Pointers] | |
99 | 2 Sum II.java | Medium | Java | [Array, Binary Search, Two Pointers] | |
100 | Coin Change.java | Medium | Java | [DP, Memoization, Sequence DP] | |
101 | Maximum Product Subarray.java | Medium | Java | [Array, DP] | |
102 | 3 Sum Closest.java | Medium | Java | [Array, Two Pointers] | |
103 | Triangle Count.java | Medium | Java | [Array] | |
104 | 3 Sum.java | Medium | Java | [Array, Two Pointers] | |
105 | 4 Sum.java | Medium | Java | [Hash Table] | |
106 | k Sum.java | Hard | Java | [DP] | |
107 | Longest Increasing Subsequence.java | Medium | Java | [Binary Search, Coordinate DP, DP, Memoization, Sequence DP] | |
108 | Unique Binary Search Tree.java | Medium | Java | [BST, DP, Tree] | |
109 | Trim a Binary Search Tree.java | Easy | Java | [BST, Tree] | |
110 | Unique Paths II.java | Medium | Java | [Array, Coordinate DP, DP] | |
111 | Bomb Enemy.java | Medium | Java | [Coordinate DP, DP] | |
112 | 3 Sum Smaller.java | Medium | Java | [Array, Two Pointers] | |
113 | Array Partition I.java | Easy | Java | [Array] | |
114 | 1-bit and 2-bit Characters.java | Easy | Java | [Array] | |
115 | Non-decreasing Array.java | Easy | Java | [Array] | |
116 | Max Consecutive Ones.java | Easy | Java | [Array] | |
117 | Find All Numbers Disappeared in an Array.java | Easy | Java | [Array] | |
118 | Maximum Average Subarray I.java | Easy | Java | [Array] | |
119 | Largest Number At Least Twice of Others.java | Easy | Java | [Array] | |
120 | Toeplitz Matrix.java | Easy | Java | [Array] | |
121 | Sum of Two Integers.java | Easy | Java | [Bit Manipulation] | |
122 | Swap Bits.java | Easy | Java | [Bit Manipulation] | |
123 | Update Bits.java | Medium | Java | [Bit Manipulation] | |
124 | Maximum XOR of Two Numbers in an Array.java | Medium | Java | [Bit Manipulation, Trie] | |
125 | Perfect Squares.java | Medium | Java | [BFS, DP, Math, Partition DP] | |
126 | Backpack VI.java | Medium | Java | [Backpack DP, DP] | |
127 | Copy Books.java | Hard | Java | [Binary Search, DP, Partition DP] | |
128 | Valid Perfect Square.java | Review | Java | [Binary Search, Math] | |
129 | Intersection of Two Arrays II.java | Easy | Java | [Binary Search, Hash Table, Sort, Two Pointers] | |
130 | Longest Palindromic Subsequence.java | Medium | Java | [DP, Interval DP, Memoization] | |
131 | Scramble String.java | Hard | Java | [DP, Interval DP, String] | |
132 | Binary Search Tree Iterator.java | Medium | Java | [BST, Design, Stack, Tree] | |
133 | Flatten Nested List Iterator.java | Medium | Java | [Design, Stack] | |
134 | Best Time to Buy and Sell Stock with Cooldown.java | Medium | Java | [DP] | |
135 | Find Peak Element.java | Medium | Java | [Array, Binary Search] | |
136 | Longest Common Subsequence.java | Medium | Java | [DP, Double Sequence DP] | |
137 | Interleaving String.java | Hard | Java | [DP, String] | |
138 | Letter Combinations of a Phone Number.java | Medium | Java | [Backtracking, String] | |
139 | Edit Distance.java | Hard | Java | [DP, Double Sequence DP, String] | |
140 | Distinct Subsequences.java | Hard | Java | [DP, String] | |
141 | Regular Expression Matching.java | Review | Java | [Backtracking, DP, String] | |
142 | Majority Element.java | Easy | Java | [Array, Bit Manipulation, Divide and Conquer] | |
143 | Wildcard Matching.java | Hard | Java | [Backtracking, DP, Greedy, String] | |
144 | Ones and Zeroes.java | Hard | Java | [DP] | |
145 | Pow(x,n).java | Medium | Java | [Binary Search, Math] | |
146 | Word Break II.java | Hard | Java | [Backtracking, DFS, DP, Memoization] | |
147 | Nested List Weight Sum.java | Easy | Java | [BFS, DFS] | |
148 | Same Tree.java | Easy | Java | [DFS, Tree] | |
149 | Convert Sorted Array to Binary Search Tree.java | Easy | Java | [DFS, Divide and Conquer, Tree] | |
150 | Construct Binary Tree from Inorder and Preorder Traversal.java | Medium | Java | [Array, DFS, Divide and Conquer, Hash Table, Tree] | |
151 | Add Binary.java | Easy | Java | [Math, String] | |
152 | Add Digits.java | Easy | Java | [Math] | |
153 | Add Two Numbers.java | Medium | Java | [Linked List, Math] | |
154 | Add Two Numbers II.java | Medium | Java | [Linked List] | |
155 | Balanced Binary Tree.java | Medium | Java | [DFS, Tree] | |
156 | Valid Anagram.java | Easy | Java | [Hash Table, Sort] | |
157 | Populating Next Right Pointers in Each Node.java | Medium | Java | [DFS, Divide and Conquer, Tree] | |
158 | Validate Binary Search Tree.java | Medium | Java | [BST, DFS, Divide and Conquer, Tree] | |
159 | Convert Sorted List to Binary Search Tree.java | Medium | Java | [BST, DFS, Divide and Conquer, Linked List] | |
160 | Flatten Binary Tree to Linked List.java | Medium | Java | [Binary Tree, DFS] | |
161 | Binary Tree Paths.java | Easy | Java | [Backtracking, Binary Tree, DFS] | |
162 | Minimum Size Subarray Sum.java | Medium | Java | [Array, Binary Search, Two Pointers] | |
163 | Clone Graph.java | Medium | Java | [BFS, DFS, Graph] | |
164 | Longest Substring Without Repeating Characters.java | Medium | Java | [Hash Table, String, Two Pointers] | |
165 | Minimum Window Substring.java | Hard | Java | [Hash Table, String, Two Pointers] | |
166 | Linked List Cycle.java | Easy | Java | [Linked List, Two Pointers] | |
167 | Remove Nth Node From End of List.java | Medium | Java | [Linked List, Two Pointers] | |
168 | Longest Substring with At Most K Distinct Characters.java | Medium | Java | [Hash Table, String] | |
169 | Linked List Cycle II.java | Medium | Java | [Linked List, Two Pointers] | |
170 | Kth Smallest Number in Sorted Matrix.java | Medium | Java | [Binary Search, Heap] | |
171 | Find Minimum in Rotated Sorted Array.java | Medium | Java | [Array, Binary Search] | |
172 | Find Minimum in Rotated Sorted Array II.java | Hard | Java | [Array, Binary Search] | |
173 | Connecting Graph.java | Medium | Java | [Union Find] | |
174 | Connecting Graph II.java | Medium | Java | [Union Find] | |
175 | Connecting Graph III.java | Medium | Java | [Union Find] | |
176 | Number of Islands.java | Medium | Java | [BFS, DFS, Matrix DFS, Union Find] | |
177 | Number of Islands II.java | Hard | Java | [Union Find] | |
178 | Surrounded Regions.java | Medium | Java | [BFS, DFS, Matrix DFS, Union Find] | |
179 | Implement Trie.java | Medium | Java | [Design, Trie] | |
180 | Add and Search Word.java | Medium | Java | [Backtracking, Design, Trie] | |
181 | Word Search II.java | Hard | Java | [Backtracking, DFS, Trie] | |
182 | Word Search.java | Medium | Java | [Array, Backtracking, DFS] | |
183 | Word Squares.java | Hard | Java | [Backtracking, Trie] | |
184 | Trapping Rain Water.java | Hard | Java | [Array, Stack, Two Pointers] | |
185 | Trapping Rain Water II.java | Hard | Java | [BFS, Heap] | |
186 | Data Stream Median.java | Hard | Java | [Design, Heap] | |
187 | Sliding Window Median.java | Hard | Java | [Design, Heap] | |
188 | Min Stack.java | Easy | Java | [Design, Stack] | |
189 | Implement Queue using Stacks.java | Easy | Java | [Design, Stack] | |
190 | Decode String.java | Medium | Java | [DFS, Divide and Conquer, Stack] | |
191 | Largest Rectangle in Histogram.java | Hard | Java | [Array, Monotonous Stack, Stack] | |
192 | Maximum Binary Tree.java | Medium | Java | [Stack, Tree] | |
193 | Reverse Integer.java | Easy | Java | [Math] | |
194 | Swap Nodes in Pairs.java | Medium | Java | [Linked List] | |
195 | Find Peak Element II.java | Hard | Java | [Binary Search, DFS, Divide and Conquer] | |
196 | Sqrt(x).java | Easy | Java | [Binary Search, Math] | |
197 | First Bad Version.java | Easy | Java | [Binary Search] | |
198 | Wood Cut.java | Medium | Java | [Binary Search] | |
199 | Find the Duplicate Number.java | Medium | Java | [Array, Binary Search, Two Pointers] | |
200 | Palindrome Pairs.java | Hard | Java | [Hash Table, String, Trie] | |
201 | Game of Life.java | Medium | Java | [Array] | |
202 | Maximum Average Subarray II.java | Review | Java | [Array, Binary Search, PreSum] | |
203 | Meeting Rooms.java | Easy | Java | [Sort, Sweep Line] | |
204 | Number of Airplane in the sky.java | Medium | Java | [Array, Interval, Sort, Sweep Line] | |
205 | Meeting Rooms II.java | Medium | Java | [Greedy, Heap, Sort, Sweep Line] | |
206 | Building Outline.java | Review | Java | [Binary Indexed Tree, Divide and Conquer, Heap, Segment Tree, Sweep Line] | |
207 | Unique Path.java | Medium | Java | [Array, Coordinate DP, DP] | |
208 | Maximal Rectangle.java | Hard | Java | [Array, DP, Hash Table, Stack] | |
209 | Maximal Square.java | Medium | Java | [Coordinate DP, DP] | |
210 | Longest Increasing Path in a Matrix.java | Hard | Java | [Coordinate DP, DFS, DP, Memoization, Topological Sort] | |
211 | Coins in a Line.java | Medium | Java | [DP, Game Theory, Greedy] | |
212 | Coins in a Line II.java | Medium | Java | [Array, DP, Game Theory, Memoization, MiniMax] | |
213 | Binary Tree Inorder Traversal.java | Easy | Java | [Hash Table, Stack, Tree] | |
214 | Binary Tree Postorder Traversal.java | Medium | Java | [Stack, Tree, Two Stacks] | |
215 | Change to Anagram.java | Easy | Java | [String] | |
216 | Classical Binary Search.java | Easy | Java | [Binary Search] | |
217 | Climbing Stairs.java | Easy | Java | [DP, Memoization, Sequence DP] | |
218 | Coins in a Line III.java | Hard | Java | [Array, DP, Game Theory, Interval DP, Memoization] | |
219 | Closest Binary Search Tree Value.java | Easy | Java | [BST, Binary Search, Tree] | |
220 | Compare Version Numbers.java | Medium | Java | [String] | |
221 | Count Complete Tree Nodes.java | Medium | Java | [Binary Search, Tree] | |
222 | Course Schedule.java | Medium | Java | [BFS, Backtracking, DFS, Graph, Topological Sort] | |
223 | Course Schedule II.java | Medium | Java | [BFS, DFS, Graph, Topological Sort] | |
224 | Binary Tree Preorder Traversal.java | Easy | Java | [BFS, DFS, Stack, Tree] | |
225 | Closest Number in Sorted Array.java | Easy | Java | [Binary Search] | |
226 | Complete Binary Tree.java | Easy | Java | [BFS, Tree] | |
227 | Compare Strings.java | Easy | Java | [String] | |
228 | Contains Duplicate.java | Easy | Java | [Array, Hash Table] | |
229 | Contains Duplicate II.java | Easy | Java | [Array, Hash Table] | |
230 | Contains Duplicate III.java | Medium | Java | [BST] | |
231 | Burst Balloons.java | Hard | Java | [DP, Divide and Conquer, Interval DP, Memoization] | |
232 | Nim Game.java | Easy | Java | [Brainteaser, DP, Game Theory] | |
233 | Convert Integer A to Integer B.java | Easy | Java | [Bit Manipulation] | |
234 | Cosine Similarity.java | Easy | Java | [Basic Implementation] | |
235 | Count 1 in Binary.java | Easy | Java | [Bit Manipulation] | |
236 | Count and Say.java | Easy | Java | [Basic Implementation, String] | |
237 | One Edit Distance.java | Medium | Java | [String] | |
238 | K Edit Distance.java | Hard | Java | [DP, Double Sequence DP, Trie] | |
239 | Jump Game.java | Medium | Java | [Array, DP, Greedy] | |
240 | Coin Change 2.java | Medium | Java | [DP, Sequence DP] | |
241 | Paint House.java | Easy | Java | [DP, Sequence DP] | |
242 | Decode Ways.java | Medium | Java | [DP, Partition DP, String] | |
243 | Longest Continuous Increasing Subsequence.java | Easy | Java | [Array, Coordinate DP, DP] | |
244 | Minimum Path Sum.java | Medium | Java | [Array, Coordinate DP, DP] | |
245 | Counting Bits.java | Medium | Java | [Bit Manipulation, Bitwise DP, DP] | |
246 | Continuous Subarray Sum.java | Medium | Java | [Coordinate DP, DP, Math] | |
247 | House Robber.java | Easy | Java | [DP, Sequence DP] | |
248 | House Robber II.java | Medium | Java | [DP, Sequence DP] | |
249 | House Robber III.java | Medium | Java | [DFS, DP, Status DP, Tree] | |
250 | Paint House II.java | Hard | Java | [DP, Sequence DP] | |
251 | Best Time to Buy and Sell Stock I.java | Easy | Java | [Array, DP, Sequence DP] | |
252 | Best Time to Buy and Sell Stock II.java | Easy | Java | [Array, DP, Greedy, Sequence DP] | |
253 | Best Time to Buy and Sell Stock III .java | Hard | Java | [Array, DP, Sequence DP] | |
254 | Best Time to Buy and Sell Stock IV.java | Hard | Java | [DP, Sequence DP] | |
255 | Russian Doll Envelopes.java | Hard | Java | [Binary Search, Coordinate DP, DP] | |
256 | Jump Game II.java | Hard | Java | [Array, Coordinate DP, DP, Greedy] | |
257 | Permutation in String.java | Medium | Java | [Two Pointers] | |
258 | Permutations II.java | Medium | Java | [Backtracking] | |
259 | Shuffle an Array.java | Medium | Java | [Permutation] | |
260 | Find All Anagrams in a String.java | Easy | Java | [Hash Table] | |
261 | Group Anagrams.java | Medium | Java | [Hash Table, String] | |
262 | Backpack.java | Medium | Java | [Backpack DP, DP] | |
263 | Backpack II.java | Medium | Java | [Backpack DP, DP] | |
264 | Backpack V.java | Medium | Java | [Backpack DP, DP] | |
265 | Count Primes.java | Easy | Java | [Hash Table, Math] | |
266 | Delete Node in a Linked List.java | Easy | Java | [Linked List] | |
267 | Excel Sheet Column Number.java | Easy | Java | [Math] | |
268 | Excel Sheet Column Title.java | Easy | Java | [Math] | |
269 | Flip Game.java | Easy | Java | [String] | |
270 | Expression Tree Build.java | Hard | Java | [Binary Tree, Expression Tree, Minimum Binary Tree, Stack] | |
271 | Expression Evaluation.java | Hard | Java | [Binary Tree, DFS, Expression Tree, Minimum Binary Tree, Stack] | |
272 | Convert Expression to Polish Notation.java | Hard | Java | [Binary Tree, DFS, Expression Tree, Stack] | |
273 | Convert Expression to Reverse Polish Notation.java | Hard | Java | [Binary Tree, DFS, Expression Tree, Stack] | |
274 | Evaluate Reverse Polish Notation.java | Medium | Java | [Stack] | |
275 | Decode Ways II.java | Hard | Java | [DP, Partition DP] | |
276 | Palindrome Partitioning II.java | Hard | Java | [DP, Partition DP] | |
277 | Backpack III.java | Hard | Java | [Backpack DP, DP] | |
278 | First Missing Positive.java | Hard | Java | [Array] | |
279 | Gas Station.java | Medium | Java | [Greedy] | |
280 | Implement strStr().java | Easy | Java | [String, Two Pointers] | |
281 | Insertion Sort List.java | Medium | Java | [Linked List, Sort] | |
282 | Integer to English Words.java | Hard | Java | [Math, String] | |
283 | Interleaving Positive and Negative Numbers.java | Medium | Java | [Two Pointers] | |
284 | Largest Number.java | Medium | Java | [Sort] | |
285 | Last Position of Target.java | Easy | Java | [Binary Search] | |
286 | Length of Last Word.java | Easy | Java | [String] | |
287 | Longest Common Substring.java | Medium | Java | [DP, Double Sequence DP, String] | |
288 | Longest Increasing Continuous subsequence.java | Easy | Java | [Array, Coordinate DP, DP] | |
289 | Longest Increasing Continuous subsequence II.java | Medium | Java | [Array, Coordinate DP, DP, Memoization] | |
290 | N-Queens.java | Hard | Java | [Backtracking] | |
291 | N-Queens II.java | Hard | Java | [Backtracking] | |
292 | Longest Words.java | Easy | Java | [Hash Map, String] | |
293 | Maximum Subarray.java | Easy | Java | [Array, DFS, DP, Divide and Conquer, PreSum, Sequence DP] | |
294 | Maximum Subarray II.java | Medium | Java | [Array, DP, Greedy, PreSum, Sequence DP] | |
295 | Median.java | Easy | Java | [Array, Quick Select, Quick Sort] | |
296 | Merge Sorted Array.java | Easy | Java | [Array, Two Pointers] | |
297 | Middle of Linked List.java | Easy | Java | [Linked List] | |
298 | Singleton.java | Easy | Java | [Design] | |
299 | Remove Linked List Elements.java | Easy | Java | [Linked List] | |
300 | Fibonacci.java | Easy | Java | [DP, Math, Memoization] | |
301 | Palindrome Linked List.java | Easy | Java | [Linked List, Two Pointers] | |
302 | Reverse Linked List.java | Easy | Java | [Linked List] | |
303 | Reverse Linked List II .java | Medium | Java | [Linked List] | |
304 | Palindrome Permutation.java | Easy | Java | [Hash Table] | |
305 | Valid Palindrome.java | Easy | Java | [String, Two Pointers] | |
306 | Implement Stack using Queues.java | Easy | Java | [Design, Stack] | |
307 | Implement Stack.java | Easy | Java | [Stack] | |
308 | Invert Binary Tree.java | Easy | Java | [BFS, DFS, Tree] | |
309 | Maximum Depth of Binary Tree.java | Easy | Java | [DFS, Tree] | |
310 | Minimum Depth of Binary Tree.java | Easy | Java | [BFS, DFS, Tree] | |
311 | Symmetric Tree.java | Easy | Java | [BFS, DFS, Tree] | |
312 | Tweaked Identical Binary Tree.java | Easy | Java | [DFS, Tree] | |
313 | Merge Two Binary Trees.java | Easy | Java | [DFS, Tree] | |
314 | Subtree.java | Easy | Java | [DFS, Tree] | |
315 | Lowest Common Ancestor of a Binary Tree.java | Medium | Java | [DFS, Tree] | |
316 | Lowest Common Ancestor II.java | Easy | Java | [Hash Table, Tree] | |
317 | Lowest Common Ancestor of a Binary Search Tree.java | Medium | Java | [BST, DFS, Tree] | |
318 | Merge Intervals.java | Medium | Java | [Array, Sort, Sweep Line] | |
319 | Hash Function.java | Easy | Java | [Hash Table] | |
320 | Merge Two Sorted Lists.java | Easy | Java | [Linked List] | |
321 | Missing Number.java | Easy | Java | [Array, Bit Manipulation, Math] | |
322 | LRU Cache.java | Hard | Java | [Design, Hash Table, Linked List] | |
323 | Remove Duplicates from Sorted Array.java | Easy | Java | [Array, Two Pointers] | |
324 | Remove Duplicates from Sorted Array II.java | Medium | Java | [Array, Two Pointers] | |
325 | Remove Duplicates from Sorted List.java | Easy | Java | [Linked List] | |
326 | Remove Duplicates from Sorted List II.java | Medium | Java | [Linked List] | |
327 | QuickSort.java | Medium | Java | [Sort] | |
328 | MergeSort.java | Medium | Java | [Merge Sort, Sort] | |
329 | Longest Word in Dictionary.java | Easy | Java | [Hash Table, Trie] | |
330 | Anagrams.java | Medium | Java | [Array, Hash Map] | |
331 | Binary Tree Level Order Traversal.java | Medium | Java | [BFS, DFS, Tree] | |
332 | Binary Tree Level Order Traversal II.java | Medium | Java | [BFS, Tree] | |
333 | Binary Tree Longest Consecutive Sequence II.java | Medium | Java | [DFS, Divide and Conquer, Double Recursive, Tree] | |
334 | Binary Tree Maximum Path Sum.java | Hard | Java | [DFS, DP, Tree, Tree DP] | |
335 | Path Sum.java | Easy | Java | [DFS, Tree] | |
336 | Path Sum II.java | Easy | Java | [Backtracking, DFS, Tree] | |
337 | Path Sum III.java | Easy | Java | [DFS, Double Recursive, Tree] | |
338 | Rotate String.java | Easy | Java | [String] | |
339 | Path Sum IV.java | Medium | Java | [DFS, Hash Map, Tree] | |
340 | Combinations.java | Medium | Java | [Backtracking, Combination, DFS] | |
341 | Combination Sum.java | Medium | Java | [Array, Backtracking, Combination, DFS] | |
342 | Combination Sum II.java | Medium | Java | [Array, Backtracking, Combination, DFS] | |
343 | Combination Sum III.java | Medium | Java | [Array, Backtracking, Combination, DFS] | |
344 | Combination Sum IV.java | Medium | Java | [Array, Backpack DP, DP] | |
345 | Subset.java | Medium | Java | [Array, BFS, Backtracking, Bit Manipulation, DFS] | |
346 | Subsets II.java | Medium | Java | [Array, BFS, Backtracking, DFS] | |
347 | Binary Tree Right Side View.java | Medium | Java | [BFS, DFS, Tree] | |
348 | Binary Tree Maximum Path Sum II.java | Medium | Java | [DFS, Tree] | |
349 | Rotate List.java | Medium | Java | [Linked List, Two Pointers] | |
350 | Basic Calculator.java | Hard | Java | [Binary Tree, Expression Tree, Math, Minimum Binary Tree, Stack] | |
351 | Longest Consecutive Sequence.java | Hard | Java | [Array, Hash Table, Union Find] | |
352 | Binary Tree Longest Consecutive Sequence.java | Medium | Java | [DFS, Divide and Conquer, Tree] | |
353 | Number of Connected Components in an Undirected Graph.java | Medium | Java | [BFS, DFS, Graph, Union Find] | |
354 | Next Closest Time.java | Medium | Java | [Basic Implementation, Enumeration, String] | |
355 | Serilization and Deserialization Of Binary Tree.java | Hard | Java | [BFS, DFS, Design, Divide and Conquer, Tree] | |
356 | Partition Array.java | Medium | Java | [Array, Quick Sort, Sort, Two Pointers] | |
357 | Word Ladder.java | Medium | Java | [BFS] | |
358 | Word Break.java | Medium | Java | [DP, Sequence DP] | |
359 | Unique Word Abbreviation.java | Medium | Java | [Design, Hash Table] | |
360 | Unique Binary Search Tree II.java | Medium | Java | [BST, DP, Divide and Conquer, Tree] | |
361 | Ugly Number.java | Medium | Java | [Math] | |
362 | Top K Frequent Words.java | Medium | Java | [Hash Table, Heap, PriorityQueue, Trie] | |
363 | Segment Tree Build.java | Medium | Java | [Binary Tree, Divide and Conquer, Segment Tree] | |
364 | Segment Tree Build II.java | Medium | Java | [Binary Tree, Divide and Conquer, Segment Tree] | |
365 | Segment Tree Query.java | Medium | Java | [Binary Tree, DFS, Divide and Conquer, Segment Tree] | |
366 | Segment Tree Modify.java | Medium | Java | [Binary Tree, DFS, Divide and Conquer, Segment Tree] | |
367 | Segment Tree Query II.java | Medium | Java | [Binary Tree, DFS, Divide and Conquer, Segment Tree] | |
368 | Count of Smaller Numbers After Self.java | Review | Java | [BST, Binary Indexed Tree, Binary Search, Divide and Conquer, Segment Tree] | |
369 | ColorGrid.java | Medium | Java | [Design, Hash Table] | |
370 | Container With Most Water.java | Medium | Java | [Array, Two Pointers] | |
371 | Convert Binary Search Tree to Doubly Linked List.java | Medium | Java | [Linked List, Tree] | |
372 | Copy List with Random Pointer.java | Medium | Java | [Hash Table, Linked List] | |
373 | Encode and Decode Strings.java | Medium | Java | [String] | |
374 | Fast Power.java | Medium | Java | [DFS, Divide and Conquer] | |
375 | Find the Connected Component in the Undirected Graph.java | Medium | Java | [BFS, DFS] | |
376 | H-Index II.java | Medium | Java | [Binary Search] | |
377 | HashWithCustomizedClass(LinkedList).java | Medium | Java | [Hash Table] | |
378 | Interval Minimum Number.java | Medium | Java | [Binary Search, Divide and Conquer, Segment Tree] | |
379 | Interval Sum.java | Medium | Java | [Binary Search, Segment Tree] | |
380 | Kth Smallest Element in a BST.java | Medium | Java | [BST, DFS, Stack, Tree] | |
381 | Longest Common Prefix.java | Easy | Java | [String] | |
382 | Majority Element II.java | Medium | Java | [Array] | |
383 | Merge k Sorted Lists.java | Medium | Java | [Divide and Conquer, Heap, Linked List, PriorityQueue] | |
384 | Merge k Sorted Arrays.java | Medium | Java | [Heap, PriorityQueue] | |
385 | Permutations.java | Medium | Java | [Backtracking, DFS, Permutation] | |
386 | Partition List.java | Medium | Java | [Linked List, Two Pointers] | |
387 | Peeking Iterator.java | Medium | Java | [Design] | |
388 | Rehashing.java | Medium | Java | [Hash Table] | |
389 | Reorder List.java | Medium | Java | [Linked List] | |
390 | Restore IP Addresses.java | Medium | Java | [Backtracking, DFS, String] | |
391 | Reverse Words in a String.java | Medium | Java | [String] | |
392 | Reverse Words in a String II.java | Medium | Java | [String] | |
393 | Reverse Words in a String III.java | Easy | Java | [String] | |
394 | Search a 2D Matrix.java | Medium | Java | [Array, Binary Search] | |
395 | Search a 2D Matrix II.java | Medium | Java | [Binary Search, Divide and Conquer] | |
396 | Search for a Range.java | Medium | Java | [Array, Binary Search] | |
397 | Search Range in Binary Search Tree .java | Medium | Java | [BST, Binary Tree] | |
398 | Merge Sorted Array II.java | Easy | Java | [Array] | |
399 | Nth to Last Node in List.java | Easy | Java | [Linked List] | |
400 | Unique Characters.java | Easy | Java | [Array, String] | |
401 | Sort List.java | Medium | Java | [Divide and Conquer, Linked List, Merge Sort, Sort] | |
402 | Summary Ranges.java | Medium | Java | [Array] | |
403 | Top K Frequent Elements.java | Medium | Java | [Hash Table, Heap, PriorityQueue] | |
404 | Topological Sorting.java | Medium | Java | [BFS, DFS, Topological Sort] | |
405 | Median of two Sorted Arrays.java | Hard | Java | [Array, Binary Search, DFS, Divide and Conquer] | |
406 | Remove Duplicate Letters.java | Hard | Java | [Greedy, Hash Table, Stack] | |
407 | Spiral Matrix.java | Medium | Java | [Array, Enumeration] | |
408 | Expression Add Operators.java | Hard | Java | [Backtracking, DFS, Divide and Conquer, String] | |
409 | Insert Interval.java | Hard | Java | [Array, PriorityQueue, Sort] | |
410 | Shortest Palindrome.java | Hard | Java | [KMP, String] | |
411 | 2 Sum.java | Easy | Java | [Array, Hash Table] | |
412 | K Empty Slots.java | Hard | Java | [Array, BST, TreeSet] | |
413 | Count of Range Sum.java | Hard | Java | [BST, Divide and Conquer, Merge Sort, PreSum] | |
414 | Max Sum of Rectangle No Larger Than K.java | Hard | Java | [Array, BST, Binary Search, DP, Queue, TreeSet] | |
415 | Perfect Rectangle.java | Hard | Java | [Design, Geometry, Hash Table] | |
416 | Construct Binary Tree from Inorder and Postorder Traversal.java | Medium | Java | [Array, DFS, Divide and Conquer, Tree] | |
417 | Generate Parentheses.java | Medium | Java | [Backtracking, DFS, Sequence DFS, String] | |
418 | Strobogrammatic Number II.java | Medium | Java | [DFS, Math, Sequence DFS] | |
419 | Alien Dictionary.java | Hard | Java | [BFS, Backtracking, DFS, Graph, Topological Sort] | |
420 | Flip Game II.java | Medium | Java | [DFS, DP, backtracking] | |
421 | Max Area of Island.java | Easy | Java | [Array, DFS] | |
422 | Max Points on a Line.java | Hard | Java | [Array, Geometry, Hash Table, Math] | |
423 | Number of Digit One.java | Hard | Java | [Math] | |
424 | Binary Representation.java | Hard | Java | [Bit Manipulation, String] | |
425 | Palindrome Partitioning.java | Medium | Java | [Backtracking, DFS] | |
426 | Graph Valid Tree.java | Medium | Java | [BFS, DFS, Graph, Union Find] | |
427 | Recover Binary Search Tree.java | Hard | Java | [BST, DFS, Tree] | |
428 | Subarray Sum.java | Easy | Java | [Array, Hash Table] | |
429 | Submatrix Sum.java | Medium | Java | [Array, Hash Table, PreSum] |