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
| 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 |
| 0304-range-sum-query-2d-immutable |
| 0053-maximum-subarray |
| 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 |
| 0209-minimum-size-subarray-sum |
| 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 |
| 0209-minimum-size-subarray-sum |
| 0438-find-all-anagrams-in-a-string |
| 0643-maximum-average-subarray-i |
| 1763-longest-nice-substring |
| 0654-maximum-binary-tree |
| 0654-maximum-binary-tree |
| 0005-longest-palindromic-substring |
| 0053-maximum-subarray |
| 0303-range-sum-query-immutable |
| 0304-range-sum-query-2d-immutable |