~/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
1-D dynamic programming
One index of state: stairs, robbers, subsequences.
27 problems
Interview roadmap
1-D dynamic programming One index of state: stairs, robbers, subsequences.
Intro DP guide
- Play first: The Hydra 1-minute game Memoization
- Cheapest way up a staircase basics py · c++ · java easy
- Flower cart: station or park py · c++ · java easy
- Climbing Stairs code the boss py · c++ · java easy
- House Robber ▶ boss game py · c++ · java medium
- Maximum Subarray ▶ boss game py · c++ · java medium
- House Robber II py · c++ · java medium
- Decode Ways py · c++ · java medium
- Word Break ▶ boss game py · c++ · java medium
More practice: 12 problems
- Ordered dice rolls that hit a target sum py · c++ · java easy
- Cheapest climb with strides of one to three steps py · c++ · java easy
- Count schedules with no process in two slots in a row Citadel py · c++ · java easy
- Collatz Sequence Steps AirbnbBloomberg py · c++ · java medium
- Knight hops on a phone keypad Citadel py · c++ · java medium
- Best score with prime-3 jumps Uber py · c++ · java medium
- Maximum Product Subarray py · c++ · java medium
- Best Time to Buy and Sell Stock with Cooldown py · c++ · java medium
- Maximum Sum Circular Subarray py · c++ · java medium
- Best Time to Buy and Sell Stock III py · c++ · java hard
- Best Time to Buy and Sell Stock IV py · c++ · java hard
- Maximum Profit in Job Scheduling AmazonGoogle py · c++ · java hard
Longest increasing subsequence guide
- Play first: The Rising Chain 1-minute game Patience sorting (LIS)
- LIS length ending at each index (O(n²) DP) basics py · c++ · java easy
- Choir line with a height gap py · c++ · java medium
- Reconstruct a longest increasing subsequence py · c++ · java medium
- Longest Increasing Subsequence code the boss py · c++ · java medium
- Towers py · c++ · java medium
- Russian Doll Envelopes py · c++ · java hard
More practice: 1 problem
- Nesting boxes: turning, 3-D and one box per box assessment 4 levels py · c++ · java hard