Skip to content
Free to read. No paywalls, ever.

Understand it.
Don’t memorise it.

Interview problems with solutions that actually teach: brute force to optimal, drawn step by step, in Python, Java, C++ and TypeScript. Plus system design you can break with your own hands.

  • Brute force to optimal
  • Python, Java, C++, TypeScript
  • Visual walkthroughs
  • Arrays
  • Linked lists
  • Graphs
  • Hash tables
  • Dynamic programming
  • Strings
  • Math
  • Greedy
  • Backtracking
  • Stacks
  • Divide and conquer
  • Bit manipulation
  • Simulation
  • Matrices
  • Greedy algorithms
  • Binary search
  • Depth-first search
  • Binary search trees
  • Recursion
  • Breadth-first search
  • Binary trees
  • String matching
  • Geometry
  • Heaps
  • Game theory
  • Counting
  • Sorting
  • Sliding windows
  • URL Shortener
  • Chat App
  • Pastebin
  • Photo Social Network
  • File Sync and Storage
  • Microblog Timeline
  • Video Streaming
  • Typeahead Autocomplete
  • API Rate Limiter
  • Distributed Metrics Aggregation
  • Distributed Event Log
  • Key-Value Store
  • Top Shared Articles
  • Web Crawler
  • News Feed
  • Nearby Places and Friends
  • Server Metrics Collector
  • Calendar Service
  • Distributed Message Queue
  • Web Analytics Pipeline
  • Sorting Large Data Sets
  • Top K Rankings
  • Job Scheduler
  • Notification Service
  • Surge Pricing
  • Concurrent Stream Limits
  • ETA and Location Sharing
  • Hotel Booking
  • A/B Testing Platform
  • Price Alerts
  • Dependency Injection Framework
  • Card Payment Processing
  • Like Counts at Scale
  • Database Control Plane
  • Login and Authentication
  • Weather App
  • Collaborative Documents
  • Social Marketplace
  • Cluster Health Monitoring
  • Ride and Courier Matching
  • Distributed Tracing
  • Flash Giveaway
  • File Downloader
  • Live Stock Prices
  • Photo Library
  • On-Call Escalation
  • Wire Transfer API
  • Live Comments
  • Live Page Viewer Count
  • Live Likes
  • Cloud Data Migration
  • Peer-to-Peer File Transfer
  • Parts Compatibility
  • Ads Management and Delivery
01 · SOLUTIONS THAT TEACH

Every answer climbs from brute force to optimal.

The same order you would talk through in an interview. See why the obvious idea is slow, then watch the better one take shape.

  1. 01SLOW

    Brute force

    O(A²·k) per pass

    Compare every pair and merge. Correct, but it would take minutes on real input.

  2. 02GOOD

    Graph + DFS

    O(n log n)

    Reframe emails as nodes. Each connected group is a person.

  3. 03BEST

    Union-Find

    O(n log n)

    Merge groups as you read. Near-constant joins and a cleaner story to tell.

02 · SEE IT HAPPEN

Step through the algorithm, not a wall of text.

Every solution comes with a walkthrough you can click through. Try it: this is Union-Find merging accounts.

Open Accounts Merge →
Accounts Merge · step 3 of 4
  1. A1ana: ana@x.com, ana.w@x.com
  2. A2ana: ana@x.com, a@y.comreading
  3. A3bo: bo@y.com
ana@x.comana.w@x.coma@y.com
bo@y.com

Read A2: it shares ana@x.com, so a@y.com joins the same group. Two “ana” accounts are now one person.

03 · SYSTEM DESIGN LAB

Break it.
Then fix it.

Push traffic until something melts. Add the cache, the queue, the shards. Watch the numbers recover. Every switch is a decision you would defend in an interview.

Open the full lab
Status
DOWN
Errors
80.2%
Traffic
40K/s
Users40K
App serversOK
CacheOK
DatabaseDOWN

The database is drowning in click writes. Turn on the click queue.

04 · HOW IT WORKS

Three steps. No sign-up wall.

  1. Pick a problem

    Filter by topic and difficulty. Each one is a classic interview question in plain words, with examples.

  2. Try it yourself

    Work it out on paper or in your own editor. The solution waits one click away, never forced on you.

  3. Learn from ours

    Brute force to optimal, a step-by-step walkthrough, code in Python, Java, C++ and TypeScript, and how to explain it out loud.

Start with one of these

See every problem →
ProblemTopicDifficultyOur solution
Two SumArraysEasyRead →
Longest Substring Without Repeating CharactersHash tablesMediumRead →
Accounts MergeGraphsMediumRead →
Merge IntervalsArraysMediumRead →
Number of IslandsGraphsMediumRead →

Questions

Yes. Every problem, every solution and the system design lab are free to read. There is no paid tier.

Your next interview starts with one problem.

Pick a problem