10
10
- [ Backtracking] ( #pattern-backtracking )
11
11
- [ Dynamic Programming] ( #pattern--dynamic-programming )
12
12
- [ Fast & Slow Pointers] ( #pattern-fast--slow-pointers )
13
- - [ Graph Traversals] ( #graphs )
13
+ - [ Graph Traversals] ( #pattern-graph-traversals )
14
14
- [ In-place Reversal of a Linked List] ( #pattern-in-place-reversal-of-a-linked-list )
15
15
- [ K-Way Merge] ( #pattern-k-way-merge )
16
16
- [ Merge Intervals] ( #pattern-merge-intervals )
@@ -64,26 +64,33 @@ In addition, you should have a good grasp on common algorithms such as:
64
64
65
65
This [ pdf] contains useful information for the built-in data structures in Java.
66
66
Other useful Java methods include ` substring() ` , ` toCharArray() ` , ` Math.max() ` ,
67
- ` Math.min() ` , and ` Arrays.fill() ` , or in your chosen language.
67
+ ` Math.min() ` , and ` Arrays.fill() ` , in your chosen language.
68
68
69
69
## Question List
70
70
71
71
### Pattern: Arrays
72
72
73
73
#### Easy:
74
74
75
+ 1 . Contains Duplicate: https://leetcode.com/problems/contains-duplicate/
75
76
1 . Missing Number: https://leetcode.com/problems/missing-number/
76
77
1 . Find All Numbers Disappeared in an Array: https://leetcode.com/problems/find-all-numbers-disappeared-in-an-array/
77
78
1 . Single Number: https://leetcode.com/problems/single-number/
78
79
79
80
#### Medium:
80
81
82
+ 1 . Product of Array Except Self: https://leetcode.com/problems/product-of-array-except-self/
81
83
1 . Find the Duplicate Number: https://leetcode.com/problems/find-the-duplicate-number/
82
84
1 . Find All Duplicates in an Array: https://leetcode.com/problems/find-all-duplicates-in-an-array/
85
+ 1 . Set Matrix Zeroes: https://leetcode.com/problems/set-matrix-zeroes/
86
+ 1 . Spiral Matrix: https://leetcode.com/problems/spiral-matrix/
87
+ 1 . Rotate Image: https://leetcode.com/problems/rotate-image/
88
+ 1 . Word Search: https://leetcode.com/problems/word-search/
83
89
84
90
#### Hard:
85
91
86
92
1 . First Missing Positive: https://leetcode.com/problems/first-missing-positive/
93
+ 1 . Longest Consecutive Sequence: https://leetcode.com/problems/longest-consecutive-sequence/
87
94
88
95
### Pattern: Backtracking
89
96
@@ -123,13 +130,23 @@ YouTube channel].
123
130
124
131
1 . Climbing Stairs: https://leetcode.com/problems/climbing-stairs/
125
132
1 . House Robber: https://leetcode.com/problems/house-robber/
133
+ 1 . Best Time to Buy and Sell Stock: https://leetcode.com/problems/best-time-to-buy-and-sell-stock/
126
134
1 . Maximum Subarray: https://leetcode.com/problems/maximum-subarray/
127
135
1 . Range Sum Query - Immutable: https://leetcode.com/problems/range-sum-query-immutable/
128
136
129
137
#### Medium:
130
138
139
+ 1 . House Robber II: https://leetcode.com/problems/house-robber-ii/
131
140
1 . Coin Change: https://leetcode.com/problems/coin-change/
141
+ 1 . Maximum Product Subarray: https://leetcode.com/problems/maximum-product-subarray/
132
142
1 . Longest Increasing Subsequence: https://leetcode.com/problems/longest-increasing-subsequence/
143
+ 1 . Longest Palindromic Substring: https://leetcode.com/problems/longest-palindromic-substring/
144
+ 1 . Word Break: https://leetcode.com/problems/word-break/
145
+ 1 . Combination Sum: https://leetcode.com/problems/combination-sum-iv/
146
+ 1 . Decode Ways: https://leetcode.com/problems/decode-ways/
147
+ 1 . Unique Paths: https://leetcode.com/problems/unique-paths/
148
+ 1 . Jump Game: https://leetcode.com/problems/jump-game/
149
+ 1 . Palindromic Substrings: https://leetcode.com/problems/palindromic-substrings/
133
150
1 . Number of Longest Increasing Subsequence: https://leetcode.com/problems/number-of-longest-increasing-subsequence/
134
151
1 . Partition Equal Subset Sum: https://leetcode.com/problems/partition-equal-subset-sum/
135
152
1 . Partition to K Equal Sum Subsets: https://leetcode.com/problems/partition-to-k-equal-sum-subsets/
@@ -151,8 +168,10 @@ The fast & slow pointer approach can be found under `3. Fast and Slow pointers`
151
168
#### Medium:
152
169
153
170
1 . Linked List Cycle II: https://leetcode.com/problems/linked-list-cycle-ii/
154
- 1 . Add Two Numbers: https://leetcode.com/problems/add-two-numbers/ ,
171
+ 1 . Add Two Numbers: https://leetcode.com/problems/add-two-numbers/
172
+ 1 . Remove Nth Node From End Of List: https://leetcode.com/problems/remove-nth-node-from-end-of-list/
155
173
1 . Sort List: https://leetcode.com/problems/sort-list/
174
+ 1 . Reorder List: https://leetcode.com/problems/reorder-list/
156
175
157
176
### Pattern: Graph Traversals
158
177
@@ -188,6 +207,10 @@ The in-place reveral technique can be found under `6. In-place reversal of linke
188
207
189
208
The k-way merge technique can be found under ` 13. K-way Merge ` [ here] .
190
209
210
+ #### Easy:
211
+
212
+ 1 . Merge Two Sorted Lists: https://leetcode.com/problems/merge-two-sorted-lists/
213
+
191
214
#### Medium:
192
215
193
216
1 . Kth Smallest Element in a Sorted Matrix: https://leetcode.com/problems/kth-smallest-element-in-a-sorted-matrix/
@@ -232,6 +255,7 @@ The modified binary search algorithm can be found under `11. Modified binary sea
232
255
233
256
#### Medium:
234
257
258
+ 1 . Find Minimum in Rotated Sorted Array: https://leetcode.com/problems/find-minimum-in-rotated-sorted-array/
235
259
1 . Find Peak Element: https://leetcode.com/problems/find-peak-element/
236
260
1 . Search in Rotated Sorted Array: https://leetcode.com/problems/search-in-rotated-sorted-array/
237
261
1 . Search in Rotated Sorted Array II: https://leetcode.com/problems/search-in-rotated-sorted-array-ii/
@@ -343,11 +367,13 @@ The tree DFS technique can be found under `8. Tree DFS` [here].
343
367
1 . Construct Binary Tree from Preorder and Inorder Traversal: https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/
344
368
1 . Validate Binary Search Tree: https://leetcode.com/problems/validate-binary-search-tree/
345
369
1 . Kth Smallest Element in a BST: https://leetcode.com/problems/kth-smallest-element-in-a-bst/
370
+ 1 . Implement Trie (Prefix Tree): https://leetcode.com/problems/implement-trie-prefix-tree/
346
371
347
372
#### Hard:
348
373
349
374
1 . Binary Tree Maximum Path Sum: https://leetcode.com/problems/binary-tree-maximum-path-sum/
350
375
1 . Serialize and Deserialize Binary Tree: https://leetcode.com/problems/serialize-and-deserialize-binary-tree/
376
+ 1 . Word Search II: https://leetcode.com/problems/word-search-ii/
351
377
352
378
### Pattern: Two Heaps
353
379
0 commit comments