Design LeetCode: A System Design Interview Breakdown

Be able to design a LeetCode-like coding judge platform end-to-end in an interview setting: define functional/non-functional requirements and APIs, safely execute untrusted user code in isolated containers, build an async submission pipeline with queuing and polling, implement real-time competition leaderboards with Redis sorted sets, do the capacity math to justify scaling decisions, and defend every trade-off the way a senior or staff engineer would.

6 sections ยท 13 lessons

Course outline

Framing the Problem

  1. Functional and Non-Functional Requirements
  2. Core Entities and API Design

Executing Untrusted Code Safely

  1. Why Direct Execution, VMs, and Serverless All Fall Short
  2. Docker Containers as the Isolation Layer
  3. Universal Test Case Serialization Across Languages

The Submission Pipeline

  1. Why Synchronous Submission Handling Breaks Under Load
  2. The Async Flow: Queue, Workers, and Client Polling

Real-Time Competition Leaderboards

  1. Why Direct DB Queries and Simple Caching Don't Scale
  2. Redis Sorted Sets for Real-Time Rankings

Scaling to 100,000 Concurrent Users

  1. Capacity Math: From Submissions to Core Count
  2. Auto-Scaling, Queue Buffering, and Progressive Polling

Trade-offs and the Interview Bar

  1. The Six Key Trade-offs in This Design
  2. What IC4, IC5, and Staff+ Are Expected to Show

Start learning with Wondering