~/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
Binary search
Sorted lookups, rotations, searching the answer.
45 problems
Interview roadmap
Binary search Sorted lookups, rotations, searching the answer.
Binary search guide
- Play first: The Sorted Golem 1-minute game Binary search
- Guess the number basics py · c++ · java easy
- Log entries in a time range py · c++ · java easy
- Binary Search code the boss py · c++ · java easy
- Find First and Last Position of Element in Sorted Array py · c++ · java medium
- Search in Rotated Sorted Array ▶ boss game py · c++ · java medium
- Find Minimum in Rotated Sorted Array py · c++ · java medium
- Search a 2D Matrix II ▶ boss game py · c++ · java medium
- Median of Two Sorted Arrays py · c++ · java hard
More practice: 9 problems
- Upper bound: first index past a value py · c++ · java easy
- Search Insert Position py · c++ · java easy
- Find Peak Element py · c++ · java medium
- Search a 2D Matrix py · c++ · java medium
- Find K Closest Elements py · c++ · java medium
- Guess the number when answers arrive one call late OpenAISnowflake py · c++ · java hard
- Find in Mountain Array py · c++ · java hard
- Violation Log Analyzer assessment 2 levels Pinterest py · c++ · java medium
- Earliest supported version and install order assessment 4 levels OpenAI py · c++ · java medium
Binary search on the answer guide
- Play first: The Hungry Boss 1-minute game Binary search on the answer
- Smallest value that passes a check basics py · c++ · java easy
- Biggest square cookies py · c++ · java medium
- Sqrt(x) py · c++ · java easy
- Koko Eating Bananas code the boss py · c++ · java medium
- Capacity to Ship Packages Within D Days py · c++ · java medium
- Earliest time to build t products py · c++ · java medium
- Split Array Largest Sum py · c++ · java hard
More practice: 4 problems
- Maximum Throughput SnowflakeTwo Sigma py · c++ · java medium
- Find Median In Large Array AirbnbGoogle py · c++ · java medium
- Maximize portfolio floor value Uber py · c++ · java medium
- Distributed mode and median under a bandwidth budget assessment 3 levels Anthropic py · c++ · java hard
Prefix sums + binary search guide
- Play first: The Loot Goblin 1-minute game Prefix sums + binary search
- Which bucket holds position x basics py · c++ · java easy
- How far does the ticket money go? py · c++ · java easy
- How many items fit the budget Uber py · c++ · java easy
- Random Pick with Weight code the boss py · c++ · java medium
- Generate Random NFT Coinbase py · c++ · java medium
Sorted containers (bisect) guide
- Play first: The Server Ring 1-minute game Consistent hashing
- Floor and ceiling with bisect basics py · c++ · java easy
- Nearest free parking spot py · c++ · java easy
- Consistent Hashing code the boss py · c++ · java medium
- My Calendar I py · c++ · java medium
- Stock price with corrections py · c++ · java medium
- Concert tickets: best ticket under a budget py · c++ · java medium
- Data Stream as Disjoint Intervals py · c++ · java hard
- Game leaderboard assessment 3 levels py · c++ · java medium
More practice: 4 problems
- Customer revenue system assessment 2 levels Databricks py · c++ · java medium
- Top k pins assessment 2 levels Pinterest py · c++ · java medium
- Spreading keys over a ring of servers assessment 3 levels py · c++ · java medium
- Memory allocator assessment 3 levels OpenAI py · c++ · java hard