Skip to content
fiveyearsdev

Tag

#lld

38 articles tagged lld.

LLDintermediate

Design Patterns Explained: The Gang-of-Four Patterns That Show Up in LLD Rounds

Design patterns explained for interviews and low-level design: the Gang of Four patterns — factory, builder, singleton, adapter, decorator, strategy, observer, state, template method, command.

16 min read
LLDadvancedPremium

Cab Ride Allocator: a Concurrency Barrier Problem (the Uber ride question)

The Uber ride concurrency interview question: seat ride-request threads into cabs of four — 4+0, 0+4, or 2+2 only — with a mutex, two semaphores, and a barrier. Deadlock-free, stress-tested.

12 min read
LLDintermediatePremium

Game Engine LLD: The Fixed-Timestep Loop and Entity-Component-System

The two ideas at the core of a game engine: a fixed-timestep loop that makes simulation deterministic at any frame rate, and an Entity-Component-System that composes behaviour without inheritance.

9 min read
LLDintermediatePremium

Web Crawler LLD: A Frontier, a Seen-Set, and the Trick Question of When You're Done

A low-level design walkthrough of a web crawler core: the frontier queue, URL normalization before deduplication, a shared seen-set, per-host politeness, and termination by in-flight count.

12 min read
LLDintermediate

Online Voting LLD: The Design Where You Destroy the Join on Purpose

A low-level design walkthrough of an online voting system: separating eligibility from the ballot so one vote per voter never links who voted to what, with an append-only, recountable tally.

10 min read
LLDintermediatePremium

Music Recognition LLD: How Shazam Turns a Noisy Hum into a Constellation of Hashes

A low-level design walkthrough of audio fingerprinting like Shazam: reducing a spectrogram to peak landmarks, hashing point pairs, and matching a noisy snippet by voting on a consistent offset.

12 min read
LLDintermediatePremium

Google Authenticator LLD: Two Devices, No Connection, One Six-Digit Truth (TOTP)

A low-level design walkthrough of TOTP and Google Authenticator: a shared secret and the clock through HMAC to six digits, with an acceptance window that tolerates skew and blocks replay.

10 min read
LLDintermediatePremium

Text Editor Core LLD: The Gap Buffer and Undo That Knows Its Own Inverse

A low-level design walkthrough of a text editor core like Sublime: the gap buffer for fast cursor-local edits, plus undo/redo stacks built from edits that describe their own inverse.

11 min read
LLDintermediatePremium

Internet Download Manager LLD: Byte Ranges, Parallel Couriers, and a Crash-Proof Journal

A low-level design walkthrough of a download manager: splitting a file into byte-range segments, downloading them in parallel with retries, and resuming after a crash from an on-disk journal.

11 min read
LLDintermediate

Bar Graph Library LLD: A Chart Is a Function from Numbers to Pictures

A low-level design walkthrough of a bar graph chart library: series data, a linear scale with nice ceilings, and pluggable renderers that draw the same chart in the console and as SVG.

10 min read
LLDintermediate

Coupon System LLD: Rules Marketing Can Edit, Money That Can't Lie

A low-level design walkthrough of a coupon and promo system: eligibility rules as composable data, discounts with caps, the preview-redeem split, and usage limits that survive a rush.

10 min read
LLDintermediatePremium

Android Unlock Pattern LLD: Nine Dots, One Skip Table, 389,112 Secrets

A low-level design walkthrough of the Android unlock pattern: the crossing rule as a lookup table, pattern validation in O(1) per move, and counting all valid patterns with backtracking and symmetry.

8 min read
LLDintermediate

Online Book Reader LLD: The Bookmark Is the Whole Design

A low-level design walkthrough of an online book reader system: a catalog of shared books, per-user sessions, page navigation that clamps at the covers, and the user-book bookmark as the hidden noun.

9 min read
LLDintermediate

Car Rental LLD: Book the Count, Assign the Car at the Counter

A low-level design walkthrough of a car rental system: reservations against category capacity instead of specific cars, interval counting on the calendar, pickup-time assignment, and late-fee billing.

10 min read
LLDintermediatePremium

Thread Pool LLD: Build ExecutorService's Heart by Hand

A low-level design walkthrough of a thread pool: the bounded work queue, the worker loop that must never die, saturation and rejection, and the graceful shutdown promise — fully tested.

9 min read
LLDintermediatePremium

Splitwise LLD: Where Every Rounding Paisa Must Find a Home

A low-level design walkthrough of a Splitwise expense sharing system: immutable expenses, derived balances, split strategies with the rounding paisa rule, and greedy debt simplification.

10 min read
LLDintermediate

Call Center LLD: Dispatch, Escalation, and the Freed Agent

A low-level design walkthrough of a call center: rank-based dispatch across respondents, managers and a director, escalation that re-dispatches, queues per rank, and the freed agent who drains them.

9 min read
LLDintermediatePremium

Elevator LLD: The Sweep That Schedules Your Building (and Your Disks)

A low-level design walkthrough of an elevator system: why first-come-first-served zigzags, the LOOK sweep algorithm, hall calls vs car calls, direction as state — fully implemented and tested.

9 min read
LLDbeginner

Alarm Service LLD: Why CloudWatch Doesn't Page You for One Bad Second

A low-level design walkthrough of an AWS-style alarm and alert service: threshold rules as data, consecutive-breach debouncing, three honest states, and observers notified on transitions only.

8 min read
LLDbeginner

Airline Management LLD: Seats Have Names, and Holds Have Timers

A low-level design walkthrough of an airline booking system: identity inventory where seat 12A is nobody's substitute, the PNR as hidden noun, and seat holds that expire by the lazy clock.

10 min read
LLDbeginner

Hotel Management LLD: The Calendar Is the Hard Part

A low-level design walkthrough of a hotel management system: half-open date ranges, the one-line overlap formula, booking a room type while the hotel assigns the room — fully implemented.

8 min read
LLDbeginner

Inventory Management LLD: The Oversell Bug and the Reserve That Kills It

A low-level design walkthrough of an inventory management system: on-hand vs reserved vs available, two-phase reservations with commit and release, and the race that double-sells the last unit.

8 min read
LLDbeginner

Restaurant Management LLD: Four State Machines Holding Hands

A low-level design walkthrough of a restaurant management system: seating by table fit, order tickets through a kitchen queue, and billing that frees the table — coordinated state machines.

8 min read
LLDbeginnerPremium

File System LLD: The Composite Pattern's Home Turf

A low-level design walkthrough of an in-memory file system: files and directories behind one Node interface, path resolution as a walk, recursive size via the Composite pattern — fully implemented.

10 min read
LLDbeginnerPremium

JSON Parser LLD: Recursive Descent, Demystified in 200 Lines

A low-level design walkthrough of a JSON parser: the grammar as a call graph, recursive descent with a position cursor, escape and number handling, and error messages that point.

10 min read
LLDbeginner

Logging Library LLD: Build log4j's Skeleton in One Sitting

A low-level design walkthrough of a logging library: ordered levels, a cheap threshold gate, formatters, appenders as a Strategy, and the complete implementation of the log4j shape.

10 min read
LLDbeginner

ATM LLD: A State Machine You'd Trust with Your Salary

A low-level design walkthrough of an ATM: a state machine that retains cards after three wrong PINs, a bank service interface because the ATM owns no truth, and cash planned before any debit.

10 min read
LLDbeginnerPremium

Chess LLD: Scope Like a Senior, Move Like a Strategy Pattern

A low-level design walkthrough of chess: scoping the unbuildable, one movement rule per piece via the Strategy pattern, a shared path-clear helper for sliding pieces, and the complete implementation.

11 min read
LLDbeginner

Tetris LLD: One Collision Check Runs the Whole Game

A low-level design walkthrough of Tetris: why the falling piece never lives on the board, rotation as pure arithmetic, line clears as a filter, and the complete implementation of the classic.

10 min read
LLDbeginner

Jackpot Machine LLD: Reels, a Paytable, and Money That Never Lies

A low-level design walkthrough of a jackpot slot machine: independent reels with injected randomness, the paytable as data instead of if-chains, and a credits ledger that always balances.

9 min read
LLDbeginner

Minesweeper LLD: Two Grids, One Flood, and a Merciful First Click

A low-level design walkthrough of minesweeper: separating truth from view, the flood fill cascade done with discipline, first-click safety, and the complete implementation of the classic.

10 min read
LLDbeginner

2048 LLD: One Merge Function Wearing Four Costumes

A low-level design walkthrough of the 2048 game: the merge-once rule everyone breaks, why all four directions are one mergeLeft function, win and lose detection, and the complete implementation.

10 min read
LLDbeginner

Snake & Ladder LLD: One Map, One Die, and a Game You Can Test

A low-level design walkthrough of snake and ladder: why snakes and ladders are one Map, how injecting the die makes the game testable, and the complete implementation with a clean turn loop.

9 min read
LLDbeginner

Vending Machine LLD: Where the State Pattern Earns Its Keep

A low-level design walkthrough of a vending machine: coins, inventory, the can't-make-change trap, and when design patterns earn their keep — the honest path from if-checks to the State pattern.

11 min read
LLDbeginner

Tic-Tac-Toe LLD: The Warm-Up Interview You Should Never Lose

A low-level design walkthrough of tic tac toe (Tic-Tac-Toe): an O(1) win check with counters, a clean state machine, and the complete implementation of the classic warm-up interview question.

10 min read
LLDbeginner

A Rookie's Guide to LLD: The Parking Lot and the Pattern Cheat Sheet

How to approach any low-level design interview: turn requirements into classes, methods, and state machines — the parking lot classic, fully built — plus a cheat sheet for picking design patterns.

9 min read
LLDadvancedPremium

Building a Rate Limiter: The Low-Level Design

A low-level design walkthrough of a rate limiter: the token bucket class, the race condition that breaks it, making it thread-safe, a per-client registry, and the complete implementation.

11 min read
LLDadvancedPremium

Designing a Thread-Safe LRU Cache

A low-level design walkthrough of an O(1) LRU cache — a hash map plus a doubly linked list — how eviction works, the locking story, and the full browsable implementation.

7 min read