Skip to content

FeibHwang/OJ-Leetcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 

Repository files navigation

OJ-LeetCode

###Two Pointers

(Notes: "♥" means you need to buy a book from Leetcode)

# Title Solution Difficulty
3 Longest Substring Without Repeating Characters C++ Medium
11 Container With Most Water C++ Medium
15 3Sum C++ Medium
16 3Sum Closest C++ Medium
18 4Sum C++ Medium
19 Remove Nth Node From End of List C++ Easy
26 Remove Duplicates from Sorted Array C++ Easy
27 Remove Element C++ Easy
28 Implement strStr() C++ Easy
30 Substring with Concatenation of All Words C++ Hard
42 Trapping Rain Water C++ Hard
61 Rotate List C++ Medium
75 Sort Colors C++ Medium
76 Minimum Window Substring C++ Hard
80 Remove Duplicates from Sorted Array II C++ Medium
86 Partition List C++ Medium
88 Merge Sorted Array C++ Easy
125 Valid Palindrome C++ Easy
141 Linked List Cycle C++ Easy
142 Linked List Cycle II C++ Medium
167 Two Sum II - Input array is sorted C++ Medium
209 Minimum Size Subarray Sum C++ Medium
234 Palindrome Linked List C++ Easy
283 Move Zeroes C++ Easy
287 Find the Duplicate Number C++ Hard
344 Reverse String C++ Easy
345 Reverse Vowels of a String C++ Easy
349 Intersection of Two Arrays C++ Easy
350 Intersection of Two Arrays II C++ Easy
360 Sort Transformed Array C++ Medium

###Hash Table

(Notes: "♥" means you need to buy a book from Leetcode)

# Title Solution Difficulty
1 Two Sum C++ Easy
3 Longest Substring Without Repeating Characters C++ Easy
18 4Sum C++ Medium
30 Substring with Concatenation of All Words C++ Hard
36 Valid Sudoku C++ Easy
37 Sudoku Solver C++ Hard
49 Group Anagrams C++ Medium
76 Minimum Window Substring C++ Hard
85 Maximal Rectangle C++ Hard
94 Binary Tree Inorder Traversal C++ Medium
136 Single Number C++ Easy
138 Copy List with Random Pointer C++ Hard
149 Max Points on a Line C++ Hard
166 Fraction to Recurring Decimal C++ Medium
187 Repeated DNA Sequences C++ Medium
202 Happy Number C++ Easy
204 Count Primes C++ Easy
205 Isomorphic Strings C++ Easy
217 Contains Duplicate C++ Easy
219 Contains Duplicate II C++ Easy
242 Valid Anagram C++ Easy
244 Shortest Word Distance II C++ Medium
249 Group Shifted Strings C++ Medium
266 Palindrome Permutation C++ Easy
274 H-Index C++ Medium
290 Word Pattern C++ Easy
299 Bulls and Cows C++ Easy
311 Sparse Matrix Multiplication C++ Medium
336 Palindrome Pairs C++ Hard
347 Top K Frequent Elements C++ Medium
349 Intersection of Two Arrays C++ Easy
350 Intersection of Two Arrays II C++ Easy
359 Logger Rate Limiter C++ Easy
380 Insert Delete GetRandom O(1) C++ Medium
381 Insert Delete GetRandom O(1) - Duplicates allowed C++ Hard
389 Find the Difference C++ Easy
409 Longest Palindrome C++ Easy
438 Find All Anagrams in a String C++ Easy
447 Number of Boomerangs C++ Easy
451 Sort Characters By Frequency C++ Medium
454 4Sum II C++ Medium
463 Island Perimeter C++ Easy
500 Keyboard Row C++ Easy
506 Relative Ranks C++ Easy
508 Most Frequent Subtree Sum C++ Medium

###Linked List

(Notes: "♥" means you need to buy a book from Leetcode)

# Title Solution Difficulty
2 Add Two Numbers C++ Medium
19 Remove Nth Node From End of List C++ Easy
21 Merge Two Sorted Lists C++ Easy
23 Merge k Sorted Lists C++ Hard
24 Swap Nodes in Pairs C++ Easy
25 Reverse Nodes in k-Group C++ Hard
61 Rotate List C++ Easy
82 Remove Duplicates from Sorted List II C++ Medium
83 Remove Duplicates from Sorted List C++ Easy
86 Partition List C++ Medium
92 Reverse Linked List II C++ Medium
109 Convert Sorted List to Binary Search Tree C++ Medium
138 Copy List with Random Pointer C++ Hard
141 Linked List Cycle C++ Easy
142 Linked List Cycle II C++ Medium
143 Reorder List C++ Medium
147 Insertion Sort List C++ Medium
148 Sort List C++ Medium
160 Intersection of Two Linked Lists C++ Easy
203 Remove Linked List Elements C++ Easy
206 Reverse Linked List C++ Easy
234 Palindrome Linked List C++ Easy
237 Delete Node in a Linked List C++ Easy
328 Odd Even Linked List C++ Medium
445 Add Two Numbers II C++ Medium

###Math

(Notes: "♥" means you need to buy a book from Leetcode)

# Title Solution Difficulty
2 Add Two Numbers C++ Medium
7 Reverse Integer C++ Easy
8 String to Integer (atoi) C++ Easy
9 Palindrome Number C++ Easy
12 Integer to Roman C++ Medium
13 Roman to Integer C++ Easy
29 Divide Two Integers C++ Medium
43 Multiply Strings C++ Medium
50 Pow(x, n) [C++](./Code/50_Pow(x, n).cpp) Medium
60 Permutation Sequence C++ Medium
65 Valid Number C++ Hard
66 Plus One C++ Easy
67 Add Binary C++ Easy
69 Sqrt(x) C++ Medium
149 Max Points on a Line C++ Hard
166 Fraction to Recurring Decimal C++ Medium
168 Excel Sheet Column Title C++ Easy
171 Excel Sheet Column Number C++ Easy
172 Factorial Trailing Zeroes C++ Easy
202 Happy Number C++ Easy
204 Count Primes C++ Easy
223 Rectangle Area C++ Easy
231 Power of Two C++ Easy
233 Number of Digit One C++ Hard
247 Strobogrammatic Number II C++ Medium
258 Add Digits C++ Easy
263 Ugly Number C++ Easy
264 Ugly Number II C++ Medium
268 Missing Number C++ Medium
273 Integer to English Words C++ Hard
279 Perfect Squares C++ Medium
313 Super Ugly Number C++ Medium
319 Bulb Switcher C++ Medium
326 Power of Three C++ Easy
335 Self Crossing C++ Hard
343 Integer Break C++ Medium
357 Count Numbers with Unique Digits C++ Medium
360 Sort Transformed Array C++ Medium
365 Water and Jug Problem C++ Medium
367 Valid Perfect Square C++ Medium
368 Largest Divisible Subset C++ Medium
372 Super Pow C++ Medium
396 Rotate Function C++ Medium
397 Integer Replacement C++ Medium
400 Nth Digit C++ Easy
413 Arithmetic Slices C++ Medium
415 Add Strings C++ Easy
423 Reconstruct Original Digits from English C++ Medium
441 Arranging Coins C++ Easy
453 Minimum Moves to Equal Array Elements C++ Easy
462 Minimum Moves to Equal Array Elements II C++ Medium

###Array

(Notes: "♥" means you need to buy a book from Leetcode)

# Title Solution Difficulty
1 Two Sum C++ Easy
4 Median of Two Sorted Arrays C++ Hard
11 Container With Most Water C++ Medium
15 3Sum C++ Medium
16 3Sum Closest C++ Medium
18 4Sum C++ Medium
26 Remove Duplicates from Sorted Array C++ Easy
27 Remove Element C++ Easy
31 Next Permutation C++ Medium
33 Search in Rotated Sorted Array C++ Hard
34 Search for a Range C++ Medium
35 Search Insert Position C++ Medium
39 Combination Sum C++ Medium
40 Combination Sum II C++ Medium
41 First Missing Positive C++ Hard
42 Trapping Rain Water C++ Hard
45 Jump Game II C++ Hard
48 Rotate Image C++ Medium
53 Maximum Subarray C++ Medium
54 Spiral Matrix C++ Medium
55 Jump Game C++ Medium
56 Merge Intervals C++ Hard
57 Insert Interval C++ Hard
59 Spiral Matrix II C++ Medium
62 Unique Paths C++ Medium
63 Unique Paths II C++ Medium
64 Minimum Path Sum C++ Medium
66 Plus One C++ Easy
73 Set Matrix Zeroes C++ Medium
74 Search a 2D Matrix C++ Medium
75 Sort Colors C++ Medium
78 Subsets C++ Medium
79 Word Search C++ Medium
80 Remove Duplicates from Sorted Array II C++ Medium
81 Search in Rotated Sorted Array II C++ Medium
84 Largest Rectangle in Histogram C++ Hard
85 Maximal Rectangle C++ Hard
88 Merge Sorted Array C++ Easy
90 Subsets_II C++ Medium
105 Construct Binary Tree from Preorder and Inorder Traversal C++ Medium
106 Construct Binary Tree from Inorder and Postorder Traversal C++ Medium
118 Pascal's Triangle C++ Easy
119 Pascal's Triangle II C++ Easy
120 Triangle C++ Medium
121 Best Time to Buy and Sell Stock C++ Easy
122 Best Time to Buy and Sell Stock II C++ Medium
123 Best Time to Buy and Sell Stock III C++ Hard
128 Longest Consecutive Sequence C++ Hard
152 Maximum Product Subarray C++ Medium
153 Find Minimum in Rotated Sorted Array C++ Medium
154 Find Minimum in Rotated Sorted Array II C++ Hard
162 Find Peak Element C++ Medium
167 Two Sum II - Input array is sorted C++ Medium
169 Majority Element C++ Easy
189 Rotate Array C++ Easy
209 Minimum Size Subarray Sum C++ Medium
216 Combination Sum III C++ Medium
217 Contains Duplicate C++ Easy
219 Contains Duplicate II C++ Easy
228 Summary Ranges C++ Medium
229 Majority Element II C++ Medium
238 Product of Array Except Self [C++](./Code/238_Product_of_Array_Except Self.cpp) Medium
243 Shortest Word Distance C++ Easy
245 Shortest Word Distance III C++ Medium
268 Missing Number C++ Medium
280 Wiggle Sort C++ Medium
283 Move Zeroes C++ Easy
287 Find the Duplicate Number C++ Hard
289 Game of Life C++ Medium
380 Insert Delete GetRandom O(1) C++ Medium
381 Insert Delete GetRandom O(1) - Duplicates allowed C++ Hard
387 First Unique Character in a String C++ Easy
414 Third Maximum Number C++ Easy
442 Find All Duplicates in an Array C++ Medium
448 Find All Numbers Disappeared in an Array C++ Easy
485 Max Consecutive Ones C++ Easy

###String

(Notes: "♥" means you need to buy a book from Leetcode)

# Title Solution Difficulty
3 Longest Substring Without Repeating Characters C++ Easy
6 ZigZag Conversion C++ Easy
8 String to Integer (atoi) C++ Easy
10 Regular Expression Matching C++ Hard
12 Integer to Roman C++ Medium
13 Roman to Integer C++ Easy
14 Longest Common Prefix C++ Easy
17 Letter Combinations of a Phone Number C++ Medium
20 Valid Parentheses C++ Easy
22 Generate Parentheses C++ Medium
28 Implement strStr() C++ Easy
30 Substring with Concatenation of All Words C++ Hard
38 Count and Say C++ Easy
43 Multiply Strings [C++](./Code/43_Multiply Strings.cpp) Medium
49 Group Anagrams C++ Medium
58 Length of Last Word C++ Easy
65 Valid Number C++ Hard
67 Add Binary C++ Easy
68 Text Justification C++ Hard
71 Simplify Path C++ Hard
72 Edit Distance C++ Hard
76 Minimum Window Substring C++ Hard
87 Scramble String C++ Hard
91 Decode Ways C++ Medium
93 Restore IP Addresses C++ Medium
97 Interleaving String C++ Hard
115 Distinct Subsequences C++ Hard
125 Valid Palindrome C++ Easy
151 Reverse Words in a String C++ Medium
165 Compare Version Numbers C++ Easy
186 Reverse Words in a String II C++ Medium
249 Group Shifted Strings C++ Medium
271 Encode and Decode Strings C++ Medium
273 Integer to English Words C++ Hard
293 Flip Game C++ Easy
336 Palindrome Pairs C++ Hard
344 Reverse String C++ Easy
345 Reverse Vowels of a String C++ Easy
383 Ransom Note C++ Easy
408 Valid Word Abbreviation C++ Easy
422 Valid Word Square C++ Easy
434 Number of Segments in a String C++ Easy
459 Repeated Substring Pattern C++ Easy
468 Validate IP Address C++ Medium
482 License Key Formatting C++ Medium
520 Detect Capital C++ Easy

###Divide and Conquer

(Notes: "♥" means you need to buy a book from Leetcode)

# Title Solution Difficulty
4 Median of Two Sorted Arrays C++ Hard
23 Merge k Sorted Lists C++ Hard
53 Maximum Subarray C++ Medium
169 Majority Element C++ Easy
215 Kth Largest Element in an Array C++ Medium
218 The Skyline Problem C++ Hard
240 Search a 2D Matrix II C++ Medium

###Binary Search

(Notes: "♥" means you need to buy a book from Leetcode)

# Title Solution Difficulty
4 Median of Two Sorted Arrays C++ Hard
29 Divide Two Integers C++ Medium
33 Search in Rotated Sorted Array C++ Hard
34 Search for a Range C++ Medium
35 Search Insert Position C++ Medium
50 Pow(x, n) [C++](./Code/50_Pow(x, n).cpp) Medium
69 Sqrt(x) C++ Medium
74 Search a 2D Matrix C++ Medium
81 Search in Rotated Sorted Array II C++ Medium
153 Find Minimum in Rotated Sorted Array C++ Medium
154 Find Minimum in Rotated Sorted Array II C++ Hard
162 Find Peak Element C++ Medium
167 Two Sum II - Input array is sorted C++ Medium
174 Dungeon Game C++ Hard
209 Minimum Size Subarray Sum C++ Medium
222 Count Complete Tree Nodes C++ Medium
230 Kth Smallest Element in a BST C++ Medium
240 Search a 2D Matrix II C++ Medium
270 Closest Binary Search Tree Value C++ Easy
275 H-Index II C++ Medium
278 First Bad Version C++ Easy
287 Find the Duplicate Number C++ Hard
300 Longest Increasing Subsequence C++ Medium
349 Intersection of Two Arrays C++ Easy
350 Intersection of Two Arrays II C++ Easy
367 Valid Perfect Square C++ Medium
374 Guess Number Higher or Lower C++ Easy
392 Is Subsequence C++ Medium
410 Split Array Largest Sum C++ Hard
441 Arranging Coins C++ Easy
454 4Sum II C++ Medium
475 Heaters C++ Easy

###Dynamic Programming

(Notes: "♥" means you need to buy a book from Leetcode)

# Title Solution Difficulty
32 Longest Valid Parentheses C++ Hard
53 Maximum Subarray C++ Medium
62 Unique Paths C++ Medium
63 Unique Paths II C++ Medium
64 Minimum Path Sum C++ Medium
70 Climbing Stairs C++ Easy
72 Edit Distance C++ Hard
85 Maximal Rectangle C++ Hard
87 Scramble String C++ Hard
91 Decode Ways C++ Medium
95 Binary Tree Inorder Traversal II C++ Medium
96 Unique Binary Search Trees C++ Medium
97 Interleaving String C++ Hard
115 Distinct Subsequences C++ Hard
120 Triangle C++ Medium
121 Best Time to Buy and Sell Stock C++ Easy
123 Best Time to Buy and Sell Stock III C++ Hard
139 Word Break C++ Medium
152 Maximum Product Subarray C++ Medium
174 Dungeon Game C++ Hard
198 House Robber C++ Easy
221 Maximal Square C++ Medium
256 Paint House C++ Easy
264 Ugly Number II C++ Medium
265 Paint House II C++ Hard
276 Paint Fence C++ Easy
279 Perfect Squares C++ Medium
300 Longest Increasing Subsequence C++ Medium
303 Range Sum Query - Immutable C++ Easy
304 Range Sum Query 2D - Immutable C++ Medium
322 Coin Change [C++](./Code/322_Coin Change.cpp) Medium
343 Integer Break C++ Medium
357 Count Numbers with Unique Digits C++ Medium
368 Largest Divisible Subset C++ Medium
375 Guess Number Higher or Lower II C++ Medium
376 Wiggle Subsequence C++ Medium
392 Is Subsequence C++ Medium
410 Split Array Largest Sum C++ Hard
413 Arithmetic Slices C++ Medium
416 Partition Equal Subset Sum C++ Medium
446 Arithmetic Slices II - Subsequence C++ Hard
467 Unique Substrings in Wraparound String C++ Medium
472 Concatenated Words C++ Hard
474 Ones and Zeroes C++ Medium
494 Target Sum C++ Medium

###Backtracking

(Notes: "♥" means you need to buy a book from Leetcode)

# Title Solution Difficulty
17 Letter Combinations of a Phone Number C++ Medium
22 Generate Parentheses C++ Medium
37 Sudoku Solver C++ Hard
39 Combination Sum C++ Medium
40 Combination Sum II C++ Medium
46 Permutations C++ Medium
47 Permutations II C++ Medium
51 N-Queens C++ Hard
52 N-Queens II C++ Hard
60 Permutation Sequence C++ Medium
77 Combinations C++ Medium
78 Subsets C++ Medium
79 Word Search C++ Medium
89 Gray Code C++ Medium
90 Subsets_II C++ Medium
93 Restore IP Addresses C++ Medium
131 Palindrome Partitioning C++ Medium
211 Add and Search Word - Data structure design C++ Medium
216 Combination Sum III C++ Medium
357 Count Numbers with Unique Digits C++ Medium
401 Binary Watch C++ Easy

###Stack

(Notes: "♥" means you need to buy a book from Leetcode)

# Title Solution Difficulty
20 Valid Parentheses C++ Easy
42 Trapping Rain Water C++ Hard
71 Simplify Path C++ Hard
84 Largest Rectangle in Histogram C++ Hard
85 Maximal Rectangle C++ Hard
94 Binary Tree Inorder Traversal C++ Medium
103 Binary Tree Zigzag Level Order Traversal C++ Medium
144 Binary Tree Preorder Traversal C++ Medium
145 Binary Tree Postorder Traversal C++ Hard
150 Evaluate Reverse Polish Notation C++ Medium
155 Min Stack C++ Easy
173 Binary Search Tree Iterator C++ Medium
225 Implement Stack using Queues C++ Easy
232 Implement Queue using Stacks C++ Easy
272 Closest Binary Search Tree Value II C++ Hard
316 Remove Duplicate Letters C++ Hard
331 Verify Preorder Serialization of a Binary Tree C++ Medium
341 Flatten Nested List Iterator C++ Medium
394 Decode String C++ Medium
402 Remove K Digits C++ Medium
456 132 Pattern C++ Medium

###Heap

(Notes: "♥" means you need to buy a book from Leetcode)

# Title Solution Difficulty
23 Merge k Sorted Lists C++ Hard
215 Kth Largest Element in an Array C++ Medium
218 The Skyline Problem C++ Hard
239 Sliding Window Maximum C++ Hard
264 Ugly Number II C++ Medium
313 Super Ugly Number C++ Medium
347 Top K Frequent Elements C++ Medium
373 Find K Pairs with Smallest Sums C++ Medium
451 Sort Characters By Frequency C++ Medium

###Greedy

(Notes: "♥" means you need to buy a book from Leetcode)

# Title Solution Difficulty
45 Jump Game II C++ Hard
55 Jump Game C++ Medium
122 Best Time to Buy and Sell Stock II C++ Medium
134 Gas Station C++ Medium
316 Remove Duplicate Letters C++ Hard
376 Wiggle Subsequence C++ Medium
392 Is Subsequence C++ Medium
402 Remove K Digits C++ Medium
406 Queue Reconstruction by Height C++ Medium
452 Minimum Number of Arrows to Burst Balloons C++ Medium
455 Assign Cookies C++ Easy

###Sort

(Notes: "♥" means you need to buy a book from Leetcode)

# Title Solution Difficulty
57 Insert Interval C++ Hard
75 Sort Colors C++ Medium
147 Insertion Sort List C++ Medium
148 Sort List C++ Medium
164 Maximum Gap C++ Hard
179 Largest Number C++ Medium
242 Valid Anagram C++ Easy
252 Meeting Rooms C++ Easy
274 H-Index C++ Medium
280 Wiggle Sort C++ Medium
349 Intersection of Two Arrays C++ Easy
350 Intersection of Two Arrays II C++ Easy

###Bit Manipulation

(Notes: "♥" means you need to buy a book from Leetcode)

# Title Solution Difficulty
78 Subsets C++ Medium
136 Single Number C++ Easy
137 Single Number C++ Medium
169 Majority Element C++ Easy
187 Repeated DNA Sequences C++ Medium
190 Reverse Bits C++ Easy
191 Number of 1 Bits C++ Easy
201 Bitwise AND of Numbers Range C++ Medium
231 Power of Two C++ Easy
260 Single Number III C++ Medium
268 Missing Number C++ Medium
318 Maximum Product of Word Lengths C++ Medium
338 Counting Bits C++ Medium
342 Power of Four C++ Easy
371 Sum of Two Integers C++ Easy
389 Find the Difference C++ Easy
393 UTF-8 Validation C++ Medium
397 Integer Replacement C++ Medium
401 Binary Watch C++ Easy
405 Convert a Number to Hexadecimal C++ Easy
461 Hamming Distance C++ Easy
476 Number Complement C++ Easy
477 Total Hamming Distance C++ Medium

###Tree

(Notes: "♥" means you need to buy a book from Leetcode)

# Title Solution Difficulty
94 Binary Tree Inorder Traversal C++ Medium
95 Binary Tree Inorder Traversal II C++ Medium
96 Unique Binary Search Trees C++ Medium
98 Validate Binary Search Tree C++ Medium
99 Recover Binary Search Tree C++ Hard
100 Same Tree C++ Easy
101 Symmetric Tree C++ Easy
102 Binary Tree Level Order Traversal C++ Easy
103 Binary Tree Zigzag Level Order Traversal C++ Medium
104 Maximum Depth of Binary Tree C++ Easy
105 Construct Binary Tree from Preorder and Inorder Traversal C++ Medium
106 Construct Binary Tree from Inorder and Postorder Traversal C++ Medium
107 Binary Tree Level Order Traversal II C++ Easy
108 Convert Sorted Array to Binary Search Tree C++ Medium
110 Balanced Binary Tree C++ Easy
111 Minimum Depth of Binary Tree C++ Easy
112 Path Sum C++ Easy
113 Path Sum II C++ Medium
114 Flatten Binary Tree to Linked List C++ Medium
116 Populating Next Right Pointers in Each Node C++ Medium
117 Populating Next Right Pointers in Each Node II C++ Hard
124 Binary Tree Maximum Path Sum C++ Hard
129 Sum Root to Leaf Numbers C++ Medium
144 Binary Tree Preorder Traversal C++ Medium
145 Binary Tree Postorder Traversal C++ Hard
156 Binary Tree Upside Down C++ Medium
173 Binary Search Tree Iterator C++ Medium
199 Binary Tree Right Side View C++ Medium
222 Count Complete Tree Nodes C++ Medium
226 Invert Binary Tree C++ Easy
230 Kth Smallest Element in a BST C++ Medium
235 Lowest Common Ancestor of a Binary Search Tree C++ Easy
236 Lowest Common Ancestor of a Binary Tree C++ Medium
257 Binary Tree Paths C++ Easy
270 Closest Binary Search Tree Value C++ Easy
272 Closest Binary Search Tree Value II C++ Hard
285 Inorder Successor in BST C++ Medium
297 Serialize and Deserialize Binary Tree C++ Hard
298 Binary Tree Longest Consecutive Sequence C++ Medium
333 Largest BST Subtree C++ Medium
404 Sum of Left Leaves C++ Easy
437 Path Sum III C++ Easy
450 Delete Node in a BST C++ Medium
508 Most Frequent Subtree Sum C++ Medium
513 Find Bottom Left Tree Value C++ Medium
515 Find Largest Value in Each Tree Row C++ Medium

###Depth-first Search

(Notes: "♥" means you need to buy a book from Leetcode)

# Title Solution Difficulty
98 Validate Binary Search Tree C++ Medium
99 Recover Binary Search Tree C++ Hard
100 Same Tree C++ Easy
101 Symmetric Tree C++ Easy
104 Maximum Depth of Binary Tree C++ Easy
105 Construct Binary Tree from Preorder and Inorder Traversal C++ Medium
106 Construct Binary Tree from Inorder and Postorder Traversal C++ Medium
108 Convert Sorted Array to Binary Search Tree C++ Medium
109 Convert Sorted List to Binary Search Tree C++ Medium
110 Balanced Binary Tree C++ Easy
111 Minimum Depth of Binary Tree C++ Easy
112 Path Sum C++ Easy
113 Path Sum II C++ Medium
114 Flatten Binary Tree to Linked List C++ Medium
116 Populating Next Right Pointers in Each Node C++ Medium
117 Populating Next Right Pointers in Each Node II C++ Hard
124 Binary Tree Maximum Path Sum C++ Hard
129 Sum Root to Leaf Numbers C++ Medium
133 Clone Graph C++ Medium
199 Binary Tree Right Side View C++ Medium
200 Number of Islands C++ Medium
207 Course Schedule C++ Medium
210 Course Schedule II C++ Medium
257 Binary Tree Paths C++ Easy
261 Graph Valid Tree C++ Medium
301 Remove Invalid Parentheses C++ Hard
323 Number of Connected Components in an Undirected Graph C++ Medium
329 Longest Increasing Path in a Matrix C++ Hard
339 Nested List Weight Sum C++ Hard
386 Lexicographical Numbers C++ Medium
394 Decode String C++ Medium
472 Concatenated Words C++ Hard
491 Increasing Subsequences C++ Medium
494 Target Sum C++ Medium
513 Find Bottom Left Tree Value C++ Medium
515 Find Largest Value in Each Tree Row C++ Medium

###Breadth-first Search

(Notes: "♥" means you need to buy a book from Leetcode)

# Title Solution Difficulty
101 Symmetric Tree C++ Easy
102 Binary Tree Level Order Traversal C++ Easy
103 Binary Tree Zigzag Level Order Traversal C++ Medium
107 Binary Tree Level Order Traversal II C++ Easy
111 Minimum Depth of Binary Tree C++ Easy
127 Word Ladder C++ Medium
130 Surrounded Regions C++ Medium
133 Clone Graph C++ Medium
199 Binary Tree Right Side View C++ Medium
200 Number of Islands C++ Medium
207 Course Schedule C++ Medium
210 Course Schedule II C++ Medium
261 Graph Valid Tree C++ Medium
279 Perfect Squares C++ Medium
286 Walls and Gates C++ Medium
301 Remove Invalid Parentheses C++ Hard
323 Number of Connected Components in an Undirected Graph C++ Medium
513 Find Bottom Left Tree Value C++ Medium
515 Find Largest Value in Each Tree Row C++ Medium
530 Minimum Absolute Difference in BST C++ Easy

###Union Find

(Notes: "♥" means you need to buy a book from Leetcode)

# Title Solution Difficulty
128 Longest Consecutive Sequence C++ Hard
130 Surrounded Regions C++ Medium
200 Number of Islands C++ Medium
261 Graph Valid Tree C++ Medium
305 Number of Islands II C++ Hard
323 Number of Connected Components in an Undirected Graph C++ Medium

###Gragh

(Notes: "♥" means you need to buy a book from Leetcode)

# Title Solution Difficulty
133 Clone Graph C++ Medium
207 Course Schedule C++ Medium
210 Course Schedule II C++ Medium
261 Graph Valid Tree C++ Medium
323 Number of Connected Components in an Undirected Graph C++ Medium

###Design

(Notes: "♥" means you need to buy a book from Leetcode)

# Title Solution Difficulty
146 LRU Cache C++ Hard
155 Min Stack C++ Easy
173 Binary Search Tree Iterator C++ Medium
208 Implement Trie (Prefix Tree) C++ Medium
221 Maximal Square C++ Medium
225 Implement Stack using Queues C++ Easy
232 Implement Queue using Stacks C++ Easy
244 Shortest Word Distance II C++ Medium
251 Flatten 2D Vector C++ Medium
284 Peeking Iterator C++ Medium
297 Serialize and Deserialize Binary Tree C++ Hard
341 Flatten Nested List Iterator C++ Medium
346 Moving Average from Data Stream C++ Easy
348 Design Tic-Tac-Toe C++ Medium
359 Logger Rate Limiter C++ Easy
362 Design Hit Counter C++ Medium
380 Insert Delete GetRandom O(1) C++ Medium
381 Insert Delete GetRandom O(1) - Duplicates allowed C++ Hard

###Topological Sort

(Notes: "♥" means you need to buy a book from Leetcode)

# Title Solution Difficulty
207 Course Schedule C++ Medium
210 Course Schedule II C++ Medium
329 Longest Increasing Path in a Matrix C++ Hard

###Trie

(Notes: "♥" means you need to buy a book from Leetcode)

# Title Solution Difficulty
208 Implement Trie (Prefix Tree) C++ Medium
211 Add and Search Word - Data structure design C++ Medium
221 Maximal Square C++ Medium
336 Palindrome Pairs C++ Hard
472 Concatenated Words C++ Hard

###Binary Indexed Tree

(Notes: "♥" means you need to buy a book from Leetcode)

# Title Solution Difficulty
218 The Skyline Problem C++ Hard
307 Range Sum Query - Mutable C++ Medium

###Segment Tree

(Notes: "♥" means you need to buy a book from Leetcode)

# Title Solution Difficulty
218 The Skyline Problem C++ Hard
307 Range Sum Query - Mutable C++ Medium

###Binary Search Tree

(Notes: "♥" means you need to buy a book from Leetcode)

# Title Solution Difficulty

###Recursion

(Notes: "♥" means you need to buy a book from Leetcode)

# Title Solution Difficulty
247 Strobogrammatic Number II C++ Medium

###Brainteaser

(Notes: "♥" means you need to buy a book from Leetcode)

# Title Solution Difficulty
292 Nim Game C++ Easy
319 Bulb Switcher C++ Medium

###Memoization

(Notes: "♥" means you need to buy a book from Leetcode)

# Title Solution Difficulty
329 Longest Increasing Path in a Matrix C++ Hard

###Queue

(Notes: "♥" means you need to buy a book from Leetcode)

# Title Solution Difficulty
346 Moving Average from Data Stream C++ Easy

###Reservoir Sampling

(Notes: "♥" means you need to buy a book from Leetcode)

# Title Solution Difficulty
382 Linked List Random Node C++ Medium
398 Random Pick Index C++ Medium

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages