AI InterviewSearch…Search problems, topics, or pages…Ctrl KGet started

Low-Level Design

Machine-coding practice: design and code a parking lot, an LRU cache, a vending machine, an elevator, a ticket booking system and Splitwise in Java — judged on how your classes behave, edge cases included.

7 modules · 14 lessons · ~5 h · exercises run on OpenJDK 18

Syllabus

Nothing is locked. Every module has a PDF.

01

From requirements to classes

you are here
Read a problem for nouns and verbs, give a shared fact its own class, keep each rule with its data — then code a library desk and a role system judged on behaviour.
0/2 · 42 minPDF
02

LRU cache

A HashMap of nodes plus a doubly linked list for O(1) get and put — then expiry on a logical clock, and hit statistics that a peek must not disturb.
0/2 · 42 minPDF
03

Parking lot

Levels of sized spots, a best-fit SpotStrategy, a vehicle factory, tickets and a PricingStrategy swapped while the lot runs.
0/2 · 42 minPDF
04

Vending machine

The State pattern with Idle, HasMoney and OutOfStock, greedy change, sold-out slots and restocking — then change from the coins actually in the box.
0/2 · 47 minPDF
05

Elevator system

One car under LOOK, then two cars and a dispatcher, then scheduling policies as a Strategy, simulated tick by tick in Java.
0/2 · 39 minPDF
06

Movie ticket booking

Seat holds that expire, payments that confirm or release, pricing as a Strategy, and the race for one seat settled by versions, in Java.
0/2 · 39 minPDF
07

Expense sharing

Splitwise in Java: money in paise, equal, exact and percent splits as strategies, net balances that add up to zero, and the greedy settle-up.
0/2 · 39 minPDF

Learn Low-Level Design: Free Low-Level Design Tutorial in 14 Lessons

Learn Low-Level Design free: 14 lessons in 7 modules, from first programs to interview questions, with exercises judged on OpenJDK 18 and a certificate.

  • Language: Low-Level Design
  • Runtime: OpenJDK 18
  • Modules: 7
  • Lessons: 14
  • Reading time: about 5 hours
  • Cost: Free on every plan, with a certificate

Machine-coding practice: design and code a parking lot, an LRU cache, a vending machine, an elevator, a ticket booking system and Splitwise in Java — judged on how your classes behave, edge cases included.

Syllabus

Module 1: From requirements to classes

Read a problem for nouns and verbs, give a shared fact its own class, keep each rule with its data — then code a library desk and a role system judged on behaviour.

Module 2: LRU cache

A HashMap of nodes plus a doubly linked list for O(1) get and put — then expiry on a logical clock, and hit statistics that a peek must not disturb.

Module 3: Parking lot

Levels of sized spots, a best-fit SpotStrategy, a vehicle factory, tickets and a PricingStrategy swapped while the lot runs.

Module 4: Vending machine

The State pattern with Idle, HasMoney and OutOfStock, greedy change, sold-out slots and restocking — then change from the coins actually in the box.

Module 5: Elevator system

One car under LOOK, then two cars and a dispatcher, then scheduling policies as a Strategy, simulated tick by tick in Java.

Module 6: Movie ticket booking

Seat holds that expire, payments that confirm or release, pricing as a Strategy, and the race for one seat settled by versions, in Java.

Module 7: Expense sharing

Splitwise in Java: money in paise, equal, exact and percent splits as strategies, net balances that add up to zero, and the greedy settle-up.