~/problems
Problems
Basics first, then the classics, then company-style assessments. Every problem has tests you run right here; multi-level ones unlock as you go. See the roadmap.
Interview roadmap
2-D dynamic programming
Grids, two strings, knapsacks, ranges.
37 problems
Interview roadmap
2-D dynamic programming Grids, two strings, knapsacks, ranges.
Grid DP guide
- Play first: The Castle Road 1-minute game Grid dynamic programming
- Can you reach the corner? basics py · c++ · java easy
- Unique Paths code the boss 2 levels py · c++ · java medium
- Minimum Path Sum py · c++ · java medium
- Minimum Falling Path Sum py · c++ · java medium
- Mushroom walks with an exact haul py · c++ · java medium
- Robots matching a sensor reading Uber py · c++ · java medium
- Longest Increasing Path in a Matrix py · c++ · java hard
- Max-score grid path with limited jumps assessment 4 levels OpenAI py · c++ · java hard
More practice: 3 problems
- Maximal Square py · c++ · java medium
- Knight stays on the board py · c++ · java medium
- Minimum Falling Path Sum II py · c++ · java hard
String DP (edit distance, LCS) guide
- Play first: The Word Duel 1-minute game Edit distance (dynamic programming)
- Longest common substring basics py · c++ · java easy
- Threading beads from two belts py · c++ · java medium
- Edit Distance code the boss py · c++ · java medium
- Longest Common Subsequence ▶ boss game py · c++ · java medium
- Longest Palindromic Substring ▶ boss game py · c++ · java medium
- Palindromic Substrings py · c++ · java medium
- Interleaving String py · c++ · java medium
- Regular Expression Matching py · c++ · java hard
More practice: 1 problem
- Distinct Subsequences py · c++ · java hard
Knapsack and coin change guide
- Play first: The Loot Limit 1-minute game 0/1 knapsack (dynamic programming)
- Can a subset hit the target? basics py · c++ · java easy
- Most pages within a budget code the boss py · c++ · java medium
- Prize stall with limited stock py · c++ · java medium
- Partition Equal Subset Sum py · c++ · java medium
- Coin Change ▶ boss game py · c++ · java medium
- Coin Change II py · c++ · java medium
- Target Sum py · c++ · java medium
- Crypto block mining Coinbase py · c++ · java hard
More practice: 3 problems
- Fill a layover with experiences Airbnb py · c++ · java medium
- Perfect Squares py · c++ · java medium
- Combination Sum IV py · c++ · java medium
Interval (range) DP guide
- Play first: The Echo Bat 1-minute game Interval DP
- Cheapest way to merge adjacent piles basics py · c++ · java easy
- Longest Palindromic Subsequence code the boss py · c++ · java medium
- Least wobbly hanging mobile py · c++ · java medium
- Minimum Cost to Cut a Stick py · c++ · java hard
- Burst Balloons py · c++ · java hard
- Count ways to erase a string in adjacent pairs py · c++ · java hard