Home
› Quick-Fire 50 - Coding Interview Cheatsheet
β±οΈ 8 min read
Sign in to track your progress across devicesSign in with Google
Progress not saved.
Quick-Fire 50 - Interview Cheatsheet
The 50 problems that show up most in FAANG + Indian tech interviews (Amazon, Google, Meta, PhonePe, Flipkart, Uber). Bookmark this page and review before every interview.
Which list should I use?
1 week of prep? β Youβre here. Quick-Fire 50.
4 weeks of prep? β The Blind 75 (includes all 50 + 25 more)
8 weeks of prep? β NeetCode 150 (most comprehensive)
Already confident on the patterns? β The Hard List (hard-only, all 20 patterns)
π‘ How to use: Scan the βApproachβ column. If you canβt explain it in 10 seconds, thatβs the one to practice.
Arrays & Hashing
Two Pointers
#
Problem
Approach
Time
Space
9
Valid Palindrome
Left/right pointers, skip non-alphanumeric, compare
O(n)
O(1)
10
3Sum
Sort + fix one, two-pointer on rest. Skip duplicates.
O(nΒ²)
O(1)
11
Container With Most Water
Left/right, move the shorter side inward
O(n)
O(1)
12
Trapping Rain Water
Two pointers with leftMax/rightMax tracking
O(n)
O(1)
Sliding Window
Stack
Binary Search
Linked List
Trees
Graphs
#
Problem
Approach
Time
Space
35
Number of Islands
BFS/DFS from each β1β, mark visited
O(mΓn)
O(mΓn)
36
Clone Graph
BFS/DFS + HashMap (old node β new node)
O(V+E)
O(V)
37
Course Schedule
Topological sort (BFS Kahnβs or DFS cycle detection)
O(V+E)
O(V+E)
38
Word Ladder
BFS level-by-level, change one char at a time
O(nΒ·26Β·L)
O(nΒ·L)
39
Dijkstraβs Shortest Path
Min-heap + relaxation
O((V+E) log V)
O(V)
Dynamic Programming
#
Problem
Approach
Time
Space
40
Climbing Stairs
dp[i] = dp[i-1] + dp[i-2] (Fibonacci)
O(n)
O(1)
41
Coin Change
dp[i] = min(dp[i-coin]+1) for each coin
O(amountΓcoins)
O(amount)
42
Longest Increasing Subsequence
DP: O(nΒ²) or patience sort with binary search: O(n log n)
O(n log n)
O(n)
43
Word Break
dp[i] = any dp[j] && s[j:i] in dict
O(nΒ²Β·L)
O(n)
44
House Robber
dp[i] = max(dp[i-1], dp[i-2] + nums[i])
O(n)
O(1)
45
Edit Distance
2D DP: insert/delete/replace at each (i,j)
O(mΓn)
O(mΓn)
Greedy / Intervals
#
Problem
Approach
Time
Space
46
Merge Intervals
Sort by start, extend end if overlapping
O(n log n)
O(n)
47
Meeting Rooms II
Sort starts + ends separately, sweep with counter
O(n log n)
O(n)
48
Jump Game
Track farthest reachable index
O(n)
O(1)
49
Non-Overlapping Intervals
Sort by end, greedily keep earliest-ending
O(n log n)
O(1)
50
Task Scheduler
Count max-freq task, compute idle slots
O(n)
O(26)
Pattern Recognition Cheatsheet
If you seeβ¦
Try this pattern
βSorted array + find pair/targetβ
Two Pointers
βContiguous subarray/substring with constraintβ
Sliding Window
βFind minimum/maximum that satisfies conditionβ
Binary Search on Answer
βShortest path in unweighted graphβ
BFS
βAll combinations/permutationsβ
Backtracking (DFS)
βOverlapping subproblems + optimal substructureβ
Dynamic Programming
βNext greater/smaller elementβ
Monotonic Stack
βConnected components / merge groupsβ
Union-Find
βTask dependencies / orderingβ
Topological Sort
βPrefix matching / dictionaryβ
Trie
βIntervals overlap/mergeβ
Sort by start + sweep
βTop K / Kth largestβ
Heap (Priority Queue)
Complexity Quick Reference
Structure
Access
Search
Insert
Delete
Array
O(1)
O(n)
O(n)
O(n)
HashMap
-
O(1) avg
O(1) avg
O(1) avg
BST (balanced)
-
O(log n)
O(log n)
O(log n)
Heap
O(1) peek
O(n)
O(log n)
O(log n)
Stack/Queue
O(1) top
O(n)
O(1)
O(1)
Sort
Best
Average
Worst
Stable?
Merge Sort
O(n log n)
O(n log n)
O(n log n)
Yes
Quick Sort
O(n log n)
O(n log n)
O(nΒ²)
No
Heap Sort
O(n log n)
O(n log n)
O(n log n)
No
Tim Sort (Java/Python default)
O(n)
O(n log n)
O(n log n)
Yes
The 10 βMust-Solve-Firstβ Problems
If you only have 3 days, solve these - they cover the most patterns with the least problems:
Two Sum (HashMap)
Best Time to Buy/Sell Stock (Greedy/Kadane)
Longest Substring Without Repeating (Sliding Window)
3Sum (Two Pointers + Sort)
Merge Intervals (Sort + Sweep)
Number of Islands (BFS/DFS)
Coin Change (DP)
LRU Cache (HashMap + DLL)
Course Schedule (Topological Sort)
Valid Parentheses (Stack)
Bookmark this page. Review it 30 minutes before every coding interview.
Want detailed solutions? Check the DSA problems section .