1 |
Two Sum |
Tutorial |
Code |
O(n) |
O(n) |
3 |
Longest Substring Without Repeating Characters |
Tutorial |
Code |
O(n) |
O(1) |
15 |
3Sum |
Tutorial |
Code |
O(n²) |
O(1) |
39 |
Combination Sum |
Tutorial |
Code |
O(|c| x t) |
O(n) |
40 |
Combination Sum II |
Tutorial |
Code |
O(|c| x t) |
O(n) |
49 |
Group Anagrams |
Tutorial |
Code |
* |
* |
55 |
Jump Game |
Tutorial |
Code |
O(n) |
O(1) |
56 |
Merge Intervals |
Tutorial |
Code |
O(nlogn) |
O(1) |
57 |
Insert Interval |
Tutorial |
Code |
O(n) |
O(1) |
70 |
Climbing Stairs |
Tutorial |
Code |
O(n) |
O(1) |
74 |
Search a 2D Matrix |
Tutorial |
Code |
$O(\log n)$ |
O(1) |
91 |
Decode Ways |
Tutorial |
Code |
O(n) |
O(1) |
104 |
Maximum Depth of Binary Tree |
Tutorial |
Code |
O(n) |
O(n) |
121 |
121. Best Time to Buy and Sell Stock |
Tutorial |
Code |
O(n) |
O(1) |
128 |
Longest Consecutive Sequence |
Tutorial |
Code |
O(n) |
O(n) |
141 |
Linked List Cycle |
Tutorial |
Code |
O(n) |
O(1) |
153 |
Find Minimum in Rotated Sorted Array |
Tutorial |
Code |
O(log n) |
O(1) |
167 |
Two Sum II - Input Array Is Sorted |
Tutorial |
Code |
O(n) |
O(1) |
198 |
House Robber |
Tutorial |
Code |
O(n) |
O(1) |
208 |
Implement Trie (Prefix Tree) |
Tutorial |
Code |
* |
* |
211 |
Design Add and Search Words Data Structure |
Tutorial |
Code |
* |
* |
213 |
House Robber II |
Tutorial |
Code |
O(n) |
O(1) |
216 |
Combination Sum III |
Tutorial |
Code |
O(n) |
O(n) |
217 |
Contains Duplicate |
Tutorial |
Code |
O(n) |
O(n) |
226 |
Invert Binary Tree |
Tutorial |
Code |
O(n) |
O(n) |
238 |
Product of Array Except Self |
Tutorial |
Code |
O(n) |
O(1) |
240 |
Search a 2D Matrix II |
Tutorial |
Code |
$O(r + c)$ |
$O(1)$ |
242 |
Valid Anagram |
Tutorial |
Code |
O(n) |
O(1) |
297 |
Serialize and Deserialize Binary Tree |
Tutorial |
Code |
O(n) |
O(n) |
322 |
Coin Change |
Tutorial |
Code |
O(|coins| * amount) |
O(amount) |
347 |
Top K Frequent Elements |
Tutorial |
Code |
O(n) |
O(n) |
377 |
Combination Sum IV |
Tutorial |
Code |
O(n) |
O(n) |
424 |
Longest Repeating Character Replacement |
Tutorial |
Code |
O(n) |
O(1) |
435 |
Non-overlapping Intervals |
Tutorial |
Code |
O(nlogn) |
O(1) |
572 |
Subtree of Another Tree |
Tutorial |
Code |
O(|s| x |t|) |
O(1) |
647 |
Palindromic Substrings |
Tutorial |
Code |
O(n²) |
O(1) |
714 |
Best Time to Buy and Sell Stock with Transaction Fee |
Tutorial |
Code |
O(n) |
O(1) |
1325 |
Delete Leaves With a Given Value |
Tutorial |
Code |
$O(n)$ |
$O(1)$ |