Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

130 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MY LEETCODE SOLUTIONS

A collection of LeetCode questions to ace the coding interview!

QUICK NOTE ON HOW I DO MOST OF MY LEETCODES IN A COMPRESSED 15-MINUTE PERIOD

  • 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.

🧠 Quick Pattern Matcher

  • Sorted Array: Two Pointers / Binary Search
  • Contiguous Subarray: Sliding Window / Prefix sums
  • Top K Elements: Heap / Priority Queue
  • Shortest Path / Levels: BFS
  • Combinations: Backtracking

LeetCode Topics

Array

0001-two-sum
0016-3sum-closest
0037-sudoku-solver
0039-combination-sum
0046-permutations
0051-n-queens
0078-subsets
0090-subsets-ii
0108-convert-sorted-array-to-binary-search-tree
0303-range-sum-query-immutable
0654-maximum-binary-tree
0848-shifting-letters
1480-running-sum-of-1d-array
2381-shifting-letters-ii
3875-construct-uniform-parity-array-i

Hash Table

0001-two-sum
0003-longest-substring-without-repeating-characters
0037-sudoku-solver
0242-valid-anagram
1763-longest-nice-substring

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

Matrix

0037-sudoku-solver

Divide and Conquer

0108-convert-sorted-array-to-binary-search-tree
0654-maximum-binary-tree
1382-balance-a-binary-search-tree
1763-longest-nice-substring

Tree

0104-maximum-depth-of-binary-tree
0108-convert-sorted-array-to-binary-search-tree
0110-balanced-binary-tree
0226-invert-binary-tree
0617-merge-two-binary-trees
0654-maximum-binary-tree
1382-balance-a-binary-search-tree

Binary Search Tree

0108-convert-sorted-array-to-binary-search-tree
1382-balance-a-binary-search-tree

Binary Tree

0104-maximum-depth-of-binary-tree
0108-convert-sorted-array-to-binary-search-tree
0110-balanced-binary-tree
0226-invert-binary-tree
0617-merge-two-binary-trees
0654-maximum-binary-tree
1382-balance-a-binary-search-tree

Depth-First Search

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

Breadth-First Search

0104-maximum-depth-of-binary-tree
0226-invert-binary-tree
0617-merge-two-binary-trees

Math

0007-reverse-integer
3875-construct-uniform-parity-array-i

Two Pointers

0005-longest-palindromic-substring
0016-3sum-closest
0345-reverse-vowels-of-a-string
3884-first-matching-character-from-both-ends

String

0003-longest-substring-without-repeating-characters
0005-longest-palindromic-substring
0242-valid-anagram
0306-additive-number
0345-reverse-vowels-of-a-string
0848-shifting-letters
1763-longest-nice-substring
2381-shifting-letters-ii
3884-first-matching-character-from-both-ends

Greedy

1382-balance-a-binary-search-tree

Bit Manipulation

0078-subsets
0090-subsets-ii
1763-longest-nice-substring

Sorting

0016-3sum-closest
0242-valid-anagram

Sliding Window

0003-longest-substring-without-repeating-characters
1763-longest-nice-substring

Stack

0654-maximum-binary-tree

Monotonic Stack

0654-maximum-binary-tree

Dynamic Programming

0005-longest-palindromic-substring

Prefix Sum

0303-range-sum-query-immutable
0848-shifting-letters
1480-running-sum-of-1d-array
2381-shifting-letters-ii

Design

0303-range-sum-query-immutable

About

A collection of LeetCode questions to ace the coding interview! - Created using [LeetHub v2](https://github.com/arunbhardwaj/LeetHub-2.0)

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages