~/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
Arrays & hashing
Counting, lookups, sorting with keys, prefix sums.
57 problems
Interview roadmap
Arrays & hashing Counting, lookups, sorting with keys, prefix sums.
Complexity analysis guide
- Play first: The Big O Showdown 1-minute game Big O: n² vs n log n
- Fast membership with a set basics py · c++ · java easy
- Count distinct values code the boss py · c++ · java easy
- Cross-team handshake energy py · c++ · java easy
- The Tax Collector assessment 3 levels py · c++ · java hard
Python toolkit
- Most common words with Counter basics easy
- Index words by line with defaultdict easy
- Newest first, then by user easy
- Running balance and peak with accumulate easy
- Count scores in a range with bisect easy
- The k longest words with nlargest easy
- Moving average of the last k readings easy
- Help desk queue with heapq easy
Hash maps and counting guide
- Play first: The Monster Vault 1-minute game Hash map (buckets and chaining)
- Count with a dict, then look up basics py · c++ · java easy
- Coffee-shop loyalty stamps py · c++ · java easy
- Design HashMap code the boss py · c++ · java easy
- Valid Anagram py · c++ · java easy
- Two Sum ▶ boss game py · c++ · java easy
- Group Anagrams ▶ boss game py · c++ · java medium
- Longest Consecutive Sequence py · c++ · java medium
- First Missing Positive py · c++ · java hard
More practice: 17 problems
- Contains Duplicate py · c++ · java easy
- Longest Common Prefix py · c++ · java easy
- Account registration deduplication Airbnb py · c++ · java easy
- Full path of a folder Uber py · c++ · java easy
- Majority Element ▶ boss game py · c++ · java easy
- Percentage transfers between accounts Coinbase py · c++ · java easy
- Bloom Filter ▶ boss game py · c++ · java medium
- Compact prefixes of a permutation Uber py · c++ · java medium
- Valid Sudoku py · c++ · java medium
- Encode and Decode Strings py · c++ · java medium
- Are two nested sets the same? Pinterest py · c++ · java medium
- Turn a tick stream into table rows Jane Street py · c++ · java medium
- Detect Squares py · c++ · java medium
- Maximum Points on a Line py · c++ · java hard
- Sparse Matrix Operation assessment 2 levels OraclePinterest py · c++ · java medium
- Simplified git diff assessment 2 levels Jane Street py · c++ · java hard
- Merkle tree directory diff assessment 2 levels Cursor py · c++ · java medium
Sorting, custom keys, coordinate compression guide
- Play first: The Tally 1-minute game Counting sort
- Leaderboard with a tuple sort key basics py · c++ · java easy
- Natural order for scanned photos py · c++ · java easy
- Counting Sort code the boss 2 levels py · c++ · java easy
- Rank among distinct values py · c++ · java easy
- K Closest Points to Origin py · c++ · java medium
- Largest Number py · c++ · java medium
- Sort an Array ▶ boss game py · c++ · java medium
More practice: 1 problem
- Minimum record by key assessment 3 levels Stripe py · c++ · java medium
Prefix sums and difference arrays guide
- Play first: The Gold Towers 1-minute game Prefix sums
- Range sums with a prefix array code the boss basics py · c++ · java easy
- Uphill metres between checkpoints py · c++ · java easy
- Range Sum Query 2D Immutable py · c++ · java medium
- Product of Array Except Self py · c++ · java medium
- Seat totals from range bookings py · c++ · java medium
- Count subarrays with a target sum (any sign) py · c++ · java medium
- Count of Stable Subarrays CitadelScale AI py · c++ · java medium
- Max Levels from Each Index Uber py · c++ · java medium
More practice: 4 problems
- Contiguous Array py · c++ · java medium
- Continuous Subarray Sum py · c++ · java medium
- Subarray Sums Divisible by K py · c++ · java medium
- When to shut the server down assessment 3 levels Stripe py · c++ · java medium