A comprehensive repository for interview prep: DSA, System Design, SQL, and Machine Coding.
- solutions/ β LeetCode solutions (JS + Python) organized by difficulty
- SQL/ β SQL interview questions with solutions
- System Design/ β System design case studies for interviews
- Machine Coding/ β Frontend/full-stack machine coding rounds
- DSA/ β DSA cheat sheet, sorting algorithms, patterns
- Design Patterns/ β 12 design patterns with JS/Python/Java code
- DevOps Notes/ β Linux, Docker, CI/CD, Terraform, AWS, Monitoring, Security
- Kubernetes Notes/ β Core concepts, Networking, Storage, Scaling, Helm, GitOps
| If the problem says... | Think about... |
|---|---|
| Sorted array | Binary Search, Two Pointers |
| All permutations/subsets | Backtracking |
| Tree | DFS, BFS |
| Graph | DFS, BFS, Union-Find |
| Linked list | Two Pointers, Fast/Slow |
| Recursion banned | Stack |
| In-place | Swap, Store multiple values per pointer |
| Max/min subarray/subset | Dynamic Programming |
| Top/least K items | Heap, QuickSelect |
| Common strings | HashMap, Trie |
| Optimize space | Bit Manipulation, Greedy |
| String patterns | Rolling Hash, Sliding Window |
| n | Target Complexity |
|---|---|
| n β€ 12 | O(n!) |
| n β€ 25 | O(2^n) |
| n β€ 500 | O(nΒ³) |
| n β€ 10β΄ | O(nΒ²) |
| n β€ 10βΆ | O(n log n) |
| n β€ 10βΈ | O(n) |
| n > 10βΈ | O(log n) or O(1) |
| # | Problem | Solution |
|---|---|---|
| 26 | Valid Palindrome | Valid Palindrome |
| 27 | Is Subsequence | Is Subsequence |
| 28 | Two Sum II - Input Array Is Sorted | Two Sum II |
| 29 | Container With Most Water | Container With Most Water |
| 30 | 3Sum | 3sum |
| # | Problem | Solution |
|---|---|---|
| 35 | Valid Sudoku | Valid Sudoku |
| 36 | Spiral Matrix | Spiral Matrix |
| 37 | Rotate Image | Rotate Image |
| 38 | Set Matrix Zeroes | Set Matrix Zeroes |
| 39 | Game of Life | Game of Life |
| # | Problem | Solution |
|---|---|---|
| 49 | Summary Ranges | Summary Ranges |
| 50 | Merge Intervals | Merge Intervals |
| 51 | Insert Interval | Insert Interval |
| 52 | Minimum Number of Arrows to Burst Balloons | Min Arrows |
| # | Problem | Solution |
|---|---|---|
| 53 | Valid Parentheses | Valid Parentheses |
| 54 | Simplify Path | Simplify Path |
| 55 | Min Stack | Min Stack |
| 56 | Evaluate Reverse Polish Notation | Evaluate RPN |
| 57 | Basic Calculator | Basic Calculator |
| # | Problem | Solution |
|---|---|---|
| 87 | Minimum Absolute Difference in BST | Min Abs Diff BST |
| 88 | Kth Smallest Element in a BST | Kth Smallest BST |
| 89 | Validate Binary Search Tree | Validate BST |
| # | Problem | Solution |
|---|---|---|
| 90 | Number of Islands | Number of Islands |
| 91 | Surrounded Regions | Surrounded Regions |
| 92 | Clone Graph | Clone Graph |
| 93 | Evaluate Division | Evaluate Division |
| 94 | Course Schedule | Course Schedule |
| 95 | Course Schedule II | Course Schedule II |
| # | Problem | Solution |
|---|---|---|
| 96 | Snakes and Ladders | Snakes and Ladders |
| 97 | Minimum Genetic Mutation | Genetic Mutation |
| 98 | Word Ladder | Word Ladder |
| # | Problem | Solution |
|---|---|---|
| 99 | Implement Trie (Prefix Tree) | Implement Trie |
| 100 | Design Add and Search Words Data Structure | Design Add Search |
| 101 | Word Search II | Word Search II |
| # | Problem | Solution |
|---|---|---|
| 102 | Letter Combinations of a Phone Number | Letter Combinations |
| 103 | Combinations | Combinations |
| 104 | Permutations | Permutations |
| 105 | Combination Sum | Combination Sum |
| 106 | N-Queens II | N-Queens II |
| 107 | Generate Parentheses | Generate Parentheses |
| 108 | Word Search | Word Search |
| # | Problem | Solution |
|---|---|---|
| 109 | Convert Sorted Array to Binary Search Tree | Convert Sorted Array to BST |
| 110 | Sort List | Sort List |
| 111 | Construct Quad Tree | Construct Quad Tree |
| 112 | Merge k Sorted Lists | Merge k Sorted Lists |
| # | Problem | Solution |
|---|---|---|
| 113 | Maximum Subarray | Maximum Subarray |
| 114 | Maximum Sum Circular Subarray | Max Sum Circular |
| # | Problem | Solution |
|---|---|---|
| 122 | Kth Largest Element in an Array | Kth Largest Element |
| 123 | IPO | IPO |
| 124 | Find K Pairs with Smallest Sums | Find K Pairs |
| 125 | Find Median from Data Stream | Find Median |
| # | Problem | Solution |
|---|---|---|
| 126 | Add Binary | Add Binary |
| 127 | Reverse Bits | Reverse Bits |
| 128 | Number of 1 Bits | Number of 1 Bits |
| 129 | Single Number | Single Number |
| 130 | Single Number II | Single Number II |
| 131 | Bitwise AND of Numbers Range | Bitwise AND Range |
| # | Problem | Solution |
|---|---|---|
| 132 | Palindrome Number | Palindrome Number |
| 133 | Plus One | Plus One |
| 134 | Factorial Trailing Zeroes | Factorial Trailing Zeroes |
| 135 | Sqrt(x) | Sqrt(x) |
| 136 | Pow(x, n) | Pow(x, n) |
| 137 | Max Points on a Line | Max Points on a Line |
| # | Problem | Solution |
|---|---|---|
| 138 | Climbing Stairs | Climbing Stairs |
| 139 | House Robber | House Robber |
| 140 | Word Break | Word Break |
| 141 | Coin Change | Coin Change |
| 142 | Longest Increasing Subsequence | LIS |
| # | Problem | Pattern | Solution |
|---|---|---|---|
| 1 | Top-K Active Users (Last 1 Hour) β Stream | Heap + Sliding Window | JS / Py |
| 2 | Order Reconciliation β Two Systems | HashMap + Set Operations | JS / Py |
| 3 | Session Grouping + Revenue β 30-min Inactivity | Sorting + Interval Merging | JS / Py |
| # | Problem | LC | Pattern | Solution |
|---|---|---|---|---|
| 1 | LRU Cache + LFU Cache | 146 / 460 | HashMap + DLL / Freq Map | JS / Py |
| 2 | Find Median from Data Stream | 295 | Two Heaps | JS / Py |
| 3 | Word Ladder | 127 | BFS + Wildcard Preprocessing | JS / Py |
| 4 | Merge K Sorted Lists | 23 | Min-Heap | JS / Py |
| 5 | Detect Cycle in Directed Graph | β | DFS 3-color / Kahn's BFS | JS / Py |
| 6 | Maximum Subarray Sum (Kadane's) | 53 | Kadane's / Greedy DP | JS / Py |
| 7 | Kth Largest Element in a Stream | 703 | Min-Heap of Size K | JS / Py |
| 8 | Task Scheduler | 621 | Greedy + Max-Heap | JS / Py |
| Pattern | LeetCode Numbers | Solution File |
|---|---|---|
| Sliding Window | 76, 209, 424, 567, 904 | JS / Py |
| Two Pointers | 11, 15, 26, 42, 75, 88 | JS / Py |
| Binary Search | 33, 153, 162, 704 | JS / Py |
| BFS | 102, 200, 994, 542, 286, 815 | JS / Py |
| Backtracking | 39, 46, 51, 78, 79 | JS / Py |
| Dynamic Programming | 70, 198, 300, 322, 1143, 416 | JS / Py |