A collection of LeetCode questions to ace the coding interview!
- 0-3 Mins (Analyze): Identify constraints (N ≤ 10⁵ → needs O(N)). Match keywords to patterns.
- 3-5 Mins (Plan): Draw a sample case on the paper. List edge cases (empty, negative, bounds).
- 5-12 Mins (Code): Use syntax templates. Put edge case checks at the top.
- 12-15 Mins (Test): Run sample cases, test custom boundaries, fix logs.
- Sorted Array: Two Pointers / Binary Search
- Contiguous Subarray: Sliding Window / Prefix sums
- Top K Elements: Heap / Priority Queue
- Shortest Path / Levels: BFS
- Combinations: Backtracking
| 0001-two-sum |
| 0003-longest-substring-without-repeating-characters |
| 0037-sudoku-solver |
| 0242-valid-anagram |
| 1763-longest-nice-substring |
| 0037-sudoku-solver |
| 0039-combination-sum |
| 0046-permutations |
| 0051-n-queens |
| 0052-n-queens-ii |
| 0077-combinations |
| 0078-subsets |
| 0090-subsets-ii |
| 0306-additive-number |
| 0037-sudoku-solver |
| 0108-convert-sorted-array-to-binary-search-tree |
| 0654-maximum-binary-tree |
| 1382-balance-a-binary-search-tree |
| 1763-longest-nice-substring |
| 0108-convert-sorted-array-to-binary-search-tree |
| 1382-balance-a-binary-search-tree |
| 0104-maximum-depth-of-binary-tree |
| 0110-balanced-binary-tree |
| 0226-invert-binary-tree |
| 0617-merge-two-binary-trees |
| 1382-balance-a-binary-search-tree |
| 0104-maximum-depth-of-binary-tree |
| 0226-invert-binary-tree |
| 0617-merge-two-binary-trees |
| 0007-reverse-integer |
| 3875-construct-uniform-parity-array-i |
| 0005-longest-palindromic-substring |
| 0016-3sum-closest |
| 0345-reverse-vowels-of-a-string |
| 3884-first-matching-character-from-both-ends |
| 1382-balance-a-binary-search-tree |
| 0078-subsets |
| 0090-subsets-ii |
| 1763-longest-nice-substring |
| 0016-3sum-closest |
| 0242-valid-anagram |
| 0003-longest-substring-without-repeating-characters |
| 1763-longest-nice-substring |
| 0654-maximum-binary-tree |
| 0654-maximum-binary-tree |
| 0005-longest-palindromic-substring |
| 0303-range-sum-query-immutable |
| 0848-shifting-letters |
| 1480-running-sum-of-1d-array |
| 2381-shifting-letters-ii |
| 0303-range-sum-query-immutable |