Divide and Conquer Interview Patterns
The Pattern Divide and conquer splits a problem into independent subproblems, solves each recursively, and combines the results. Three steps: […]
The Pattern Divide and conquer splits a problem into independent subproblems, solves each recursively, and combines the results. Three steps: […]
Requirements One-on-one messaging and group chats (up to 500 members) Real-time message delivery (< 100ms), offline message storage, read receipts
GCD and LCM Euclidean algorithm: gcd(a,b) = gcd(b, a%b), base case gcd(a,0) = a. Time O(log min(a,b)). LCM: lcm(a,b) =
Requirements Users can browse events, select seats from a seat map, reserve seats, and complete payment Prevent double-booking: no two
Upload Pipeline Raw video upload → object storage (S3 raw bucket) → message published to transcoding queue (SQS/Kafka) → transcoding
Core Idea Build a prefix array where prefix[i] = arr[0] + arr[1] + … + arr[i-1]. Then any range sum
What a CDN Does A Content Delivery Network caches content at edge Points of Presence (PoPs) geographically close to users,
Two Graph Models The first design decision is the relationship model: Directed graph (Twitter/Instagram follow): A follows B does not
Core Services A ride-sharing platform like Uber or Lyft decomposes into focused microservices: Location Service: ingests driver GPS pings, maintains
Requirements Design a file storage system like Google Drive or Dropbox supporting: Upload and download files up to 50 GB
Design patterns appear in coding interviews in two ways: the interviewer asks you to implement a specific pattern, or you’re
An e-commerce platform touches nearly every backend concept that appears in system design interviews: relational data modeling, inventory consistency, distributed
Typeahead search (also called autocomplete) is one of the most latency-sensitive features in a modern product. Users expect suggestions to
A ticket booking system like Ticketmaster must handle concurrent seat selection, hold expiry, payment confirmation, and flash sale traffic spikes.
A proximity service answers “find all restaurants / drivers / users within R km of this location” with low latency