Neetcode 150¶
Commonly used algorithms
Strings => Z Function Pattern Match
Arrays & Hashing¶
| Problems | Tags | References |
|---|---|---|
| Contains Duplicate |
|
notes | link |
| Valid Anagram |
|
notes | link |
| Two Sum |
|
notes | link |
| Group Anagrams |
|
notes | link |
| Top K Frequent Elements |
|
notes | link |
| Encode and Decode Strings |
|
notes | link |
| ⭐Product of Array Except Self |
|
notes | link |
| Valid Sudoku |
|
notes | link |
| ⭐Longest Consecutive Sequence |
|
notes | link |
Two Pointers¶
| Problems | Tags | References |
|---|---|---|
| Valid Palindrome |
|
notes | link |
| Two Sum II Input Array Is Sorted |
|
notes | link |
| ⭐3Sum |
|
notes | link |
| Container With Most Water |
|
notes | link |
| ⭐Trapping Rain Water |
|
notes | link |
Sliding Window¶
| Problems | Tags | References |
|---|---|---|
| Best Time to Buy And Sell Stock |
|
notes | link |
| Longest Substring Without Repeating Characters |
|
notes | link |
| ⭐Longest Repeating Character Replacement |
|
notes | link |
| Permutation In String |
|
notes | link |
| ⭐Minimum Window Substring |
|
notes | link |
| Sliding Window Maximum |
|
notes | link |
Stack¶
| Problems | Tags | References |
|---|---|---|
| Valid Parentheses |
|
notes | link |
| Min Stack |
|
notes | link |
| Evaluate Reverse Polish Notation |
|
notes | link |
| Daily Temperatures |
|
notes | link |
| ⭐Car Fleet |
|
notes | link |
| ⭐Largest Rectangle In Histogram |
|
notes | link |
Binary Search¶
| Problems | Tags | References |
|---|---|---|
| Binary Search |
|
notes | link |
| Search a 2D Matrix |
|
notes | link |
| Koko Eating Bananas |
|
notes | link |
| Find Minimum In Rotated Sorted Array |
|
notes | link |
| Search In Rotated Sorted Array |
|
notes | link |
| Time Based Key Value Store |
|
notes | link |
| ⭐Median of Two Sorted Arrays |
|
notes | link |
Linked List¶
| Problems | Tags | References |
|---|---|---|
| Reverse Linked List |
|
notes | link |
| Merge Two Sorted Lists |
|
notes | link |
| Linked List Cycle |
|
notes | link |
| ⭐Reorder List |
|
notes | link |
| Remove Nth Node From End of List |
|
notes | link |
| Copy List With Random Pointer |
|
notes | link |
| Add Two Numbers |
|
notes | link |
| Find The Duplicate Number |
|
notes | link |
| ⭐LRU Cache |
|
notes | link |
| Merge K Sorted Lists |
|
notes | link |
| ⭐Reverse Nodes In K Group |
|
notes | link |
Trees¶
| Problems | Tags | References |
|---|---|---|
| Invert Binary Tree |
|
notes | link |
| Maximum Depth of Binary Tree |
|
notes | link |
| Diameter of Binary Tree |
|
notes | link |
| Balanced Binary Tree |
|
notes | link |
| Same Tree |
|
notes | link |
| Subtree of Another Tree |
|
notes | link |
| Lowest Common Ancestor of a Binary Search Tree |
|
notes | link |
| Binary Tree Level Order Traversal |
|
notes | link |
| Binary Tree Right Side View |
|
notes | link |
| Count Good Nodes In Binary Tree |
|
notes | link |
| Validate Binary Search Tree |
|
notes | link |
| ⭐Kth Smallest Element in a BST |
|
notes | link |
| Construct Binary Tree From Preorder And Inorder Traversal |
|
notes | link |
| ⭐Binary Tree Maximum Path Sum |
|
notes | link |
| Serialize And Deserialize Binary Tree |
|
notes | link |