~/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
Heaps
Top-k, merging streams, scheduling by time.
23 problems
Interview roadmap
Heaps Top-k, merging streams, scheduling by time.
Heaps and priority queues guide
- Basics: the k smallest values with heapq basics py · c++ · java easy
- Help desk by urgency easy
- Top K Frequent Elements py · c++ · java easy
- Kth Largest Element in an Array py · c++ · java medium
- Merge K Sorted Lists py · c++ · java medium
- Find Median from Data Stream py · c++ · java medium
- Seniority queue at the grazing field py · c++ · java medium
- Balance pins across columns Pinterest py · c++ · java easy
- OA: Escape room leaderboard 2 levels Pinterest py · c++ · java medium
- Top ads in a time window Pinterest py · c++ · java easy
- Kth Largest Element in a Stream py · c++ · java easy
- Last Stone Weight py · c++ · java easy
- Design Twitter py · c++ · java medium
- Reorganize String py · c++ · java medium
- IPO py · c++ · java hard
Heap scheduling (deadlines, leases) guide
- Basics: hand each job to the earliest-free server basics py · c++ · java easy
- Laundromat with impatient customers py · c++ · java easy
- Task Scheduler py · c++ · java medium
- Single-Threaded CPU py · c++ · java medium
- GPU credit ledger 3 levels OpenAI py · c++ · java hard
- Webhook delivery with retries 3 levels OpenAI medium
- Task processor with dependencies and deadlines 3 levels Scale AI medium
- Meeting Rooms III py · c++ · java hard