Blind 75 roadmap
The classic 75 interview problems.
For: Interviewing in 6 to 10 weeks
Arrays and Hashing
Trade memory for speed by remembering what you have already seen.
- Two Sum
- Contains Duplicate
- Valid Anagram
- Group Anagrams
- Top K Frequent Elements
- Product of Array Except Self
- Longest Consecutive Sequence
- Encode and Decode Strings
Two Pointers
Walk a sequence from both ends, or at two speeds, to avoid nested loops.
Binary Search
Halve the search space each step, on sorted data or on an answer range.
Stack
Last in, first out. Use it to match pairs and undo work.
Sliding Window
Keep a moving range valid while you slide it across the input.
- Best Time to Buy and Sell Stock
- Longest Substring Without Repeating Characters
- Longest Repeating Character Replacement
- Minimum Window Substring
Intervals
Sort ranges by start so overlaps can be merged, counted and scheduled.
Linked List
Rewire pointers in place, and use fast and slow pointers to find cycles and middles.
- Reverse Linked List
- Merge Two Sorted Lists
- Reorder List
- Remove Nth Node From End of List
- Linked List Cycle
- Merge k Sorted Lists
Trees
Think recursively: solve a node from the answers for its children.
- Invert Binary Tree
- Maximum Depth of Binary Tree
- Same Tree
- Subtree of Another Tree
- Lowest Common Ancestor of a Binary Search Tree
- Binary Tree Level Order Traversal
- Binary Tree Maximum Path Sum
- Serialize and Deserialize Binary Tree
- Construct Binary Tree from Preorder and Inorder Traversal
Binary Search Trees
Use the ordering invariant to search, insert and validate in O(height).
Heap / Priority Queue
Always get the smallest or largest item next without sorting everything.
Tries
Share prefixes in a tree of characters for fast prefix and dictionary lookups.
Backtracking
Build candidates step by step and undo a choice when it cannot lead to an answer.
Graphs
Traverse connected structures: islands, components, shortest hops in a grid.
- Number of Islands
- Clone Graph
- Pacific Atlantic Water Flow
- Graph Valid Tree
- Number of Connected Components in an Undirected Graph
1-D Dynamic Programming
Break a problem into overlapping subproblems and store each answer once.
- Climbing Stairs
- House Robber
- House Robber II
- Longest Palindromic Substring
- Palindromic Substrings
- Decode Ways
- Longest Increasing Subsequence
- Word Break
Topological Sort
Order tasks by their dependencies and detect cycles.
Greedy
Take the locally best choice when it provably leads to a global best.
Knapsack and Subset DP
Choose items under a budget; the pattern behind coin change and partitions.
2-D Dynamic Programming
Fill a table indexed by two variables: grids, two strings, intervals.
Matrices and Grids
Rotate, spiral and search 2-D arrays, and treat a grid as an implicit graph.
Bit Manipulation
Work on the binary form with AND, OR, XOR and shifts.