High-Level & Low-Level Design Interview Problems interview questions

25 questions from the High-Level & Low-Level Design Interview Problems course, each with the correct answer and an explanation. Try to answer before you open the answer.

How Design Rounds Work

1. Which signal matters most in an LLD round?

  1. Estimating global bandwidth
  2. Choosing between two cloud vendors
  3. Clear class responsibilities and extensible, correct code
  4. Designing a CDN topology
Show answer

Answer: Clear class responsibilities and extensible, correct code

LLD is about object modelling and code quality.

Lesson: HLD Versus LLD Rounds

2. What should come first in either round?

  1. Clarifying requirements and scope
  2. Writing the database schema
  3. Picking a message broker
  4. Implementing the hardest method
Show answer

Answer: Clarifying requirements and scope

Design follows requirements.

Lesson: A Compact Approach for Each Round

3. Which is a common LLD mistake?

  1. Mentioning thread safety
  2. Separating pricing into its own strategy
  3. Asking about requirements
  4. Putting most logic in one large god class
Show answer

Answer: Putting most logic in one large god class

Responsibilities should be split.

Lesson: Common Mistakes

LLD Fundamentals for Interviews

4. A Loan that holds a reference to a BookCopy is best described as:

  1. Inheritance from BookCopy
  2. An association between Loan and BookCopy
  3. A static utility method
  4. An enum value
Show answer

Answer: An association between Loan and BookCopy

A loan refers to a copy; it is not a kind of copy.

Lesson: Finding Entities and Relationships

5. Adding a new pricing rule by writing a new class rather than editing existing ones follows which principle?

  1. Liskov substitution
  2. Open/closed
  3. Interface segregation
  4. Single table inheritance
Show answer

Answer: Open/closed

Open for extension, closed for modification.

Lesson: SOLID Applied Briefly

6. A vending machine that behaves differently when idle, holding money or dispensing is a natural fit for:

  1. A bigger switch statement in every method
  2. The Singleton pattern
  3. The Adapter pattern
  4. The State pattern
Show answer

Answer: The State pattern

One class per state.

Lesson: Patterns That Recur in LLD

LLD Problems I

7. Why make spot allocation atomic?

  1. So two gates cannot assign the same spot at the same time
  2. To speed up fee calculation
  3. To avoid needing tickets
  4. Because enums are not thread safe
Show answer

Answer: So two gates cannot assign the same spot at the same time

Concurrent entries race for spots.

Lesson: Design a Parking Lot

8. In the LOOK policy, when does the car reverse direction?

  1. Only at the top and bottom floors
  2. After every floor
  3. When no requested stops remain ahead in the current direction
  4. When a random timer fires
Show answer

Answer: When no requested stops remain ahead in the current direction

LOOK reverses at the last request, not the building edge.

Lesson: Design an Elevator System

9. What should happen when a product is selected in the Idle state?

  1. The machine moves to Dispensing
  2. The product is dispensed for free
  3. The request is rejected because no money has been inserted
  4. The balance becomes negative
Show answer

Answer: The request is rejected because no money has been inserted

Each state allows only valid actions.

Lesson: Design a Vending Machine

LLD Problems II

10. Why use a temporary hold with an expiry?

  1. So seats are reserved during payment but released if the user abandons
  2. To make payment optional
  3. To avoid needing a database
  4. To let two users share a seat
Show answer

Answer: So seats are reserved during payment but released if the user abandons

Holds protect the payment window without locking seats forever.

Lesson: Seat Booking With Concurrency

11. Why is a doubly linked list used rather than a singly linked list?

  1. To avoid using a hash map
  2. To sort keys alphabetically
  3. To store duplicate keys
  4. To unlink a node in O(1) given only a reference to it
Show answer

Answer: To unlink a node in O(1) given only a reference to it

Removal needs the previous pointer.

Lesson: Design an LRU Cache Class

12. In a token bucket, what does the capacity control?

  1. The number of users
  2. The maximum burst of requests allowed at once
  3. The refill rate per second
  4. The request timeout
Show answer

Answer: The maximum burst of requests allowed at once

Capacity is burst; rate is sustained throughput.

Lesson: Design a Rate Limiter Class

HLD Problems I

13. Why keep live driver locations in an in-memory geo-index?

  1. Locations must be kept forever
  2. Updates are frequent and short-lived, and nearby lookups must be fast
  3. Relational joins are needed for every update
  4. Drivers rarely move
Show answer

Answer: Updates are frequent and short-lived, and nearby lookups must be fast

High-rate, ephemeral data with spatial queries.

Lesson: Design a Ride-Hailing Service

14. What prevents a retried payment request from charging the customer twice?

  1. Sharding the orders table
  2. A larger timeout
  3. Caching the product page
  4. An idempotency key sent with the charge
Show answer

Answer: An idempotency key sent with the charge

Same key, same result.

Lesson: Design E-commerce Checkout and Inventory

15. What does adaptive bitrate streaming do?

  1. Lets the player switch between renditions based on network conditions
  2. Compresses video on the client before upload
  3. Stores one rendition per user
  4. Replaces the CDN
Show answer

Answer: Lets the player switch between renditions based on network conditions

ABR adapts quality segment by segment.

Lesson: Design a Video Streaming Platform

HLD Problems II

16. With N = 3, which setting gives overlapping read and write quorums?

  1. W = 1 and R = 2
  2. W = 1 and R = 1
  3. W = 2 and R = 2
  4. W = 0 and R = 3
Show answer

Answer: W = 2 and R = 2

R + W must exceed N.

Lesson: Design a Distributed Key-Value Store

17. Why store top-k completions at each trie node?

  1. To support exact-match search only
  2. To reduce the number of prefixes
  3. So a lookup does not need to traverse the whole subtree
  4. To make writes faster than reads
Show answer

Answer: So a lookup does not need to traverse the whole subtree

Precomputation moves work off the read path.

Lesson: Design Search Autocomplete

18. How is a mistaken ledger entry corrected in a double-entry ledger?

  1. By appending a reversing entry, keeping history intact
  2. By editing the original amount
  3. By deleting the transaction row
  4. By changing the account balance directly
Show answer

Answer: By appending a reversing entry, keeping history intact

Ledgers are append-only for auditability.

Lesson: Design a Payment System and Ledger

HLD Problems III

19. Which property makes CRDTs attractive for offline editing?

  1. They forbid concurrent edits
  2. They require a single central lock
  3. They never store metadata
  4. Replicas can merge operations in any order and still converge
Show answer

Answer: Replicas can merge operations in any order and still converge

Convergence without central ordering.

Lesson: Design Collaborative Document Editing

20. Why should job handlers be idempotent?

  1. Because queues reorder all jobs randomly
  2. Because a job may run more than once after a worker failure and retry
  3. Because cron syntax requires it
  4. Because databases cannot store results
Show answer

Answer: Because a job may run more than once after a worker failure and retry

At-least-once delivery implies duplicates.

Lesson: Design a Distributed Job Scheduler

21. Why can adding a user id label to a metric be dangerous?

  1. Labels are not supported by time-series databases
  2. It can explode the number of time series (high cardinality)
  3. It makes metrics immutable
  4. It disables compression entirely
Show answer

Answer: It can explode the number of time series (high cardinality)

Each unique label combination is a new series.

Lesson: Design a Metrics and Logging Pipeline

Delivering and Practising

22. What makes an HLD diagram easier to follow?

  1. Drawing every class in the system
  2. Using as many boxes as possible
  3. Omitting data stores
  4. Labelled arrows showing what flows and whether calls are sync or async
Show answer

Answer: Labelled arrows showing what flows and whether calls are sync or async

Arrows carry the meaning.

Lesson: Drawing Clear Diagrams

23. Which statement best shows trade-off reasoning?

  1. Choosing eventual consistency for the feed to gain availability, while keeping payments strongly consistent
  2. Using the newest database because it is popular
  3. Saying the system will never fail
  4. Adding a cache everywhere without discussion
Show answer

Answer: Choosing eventual consistency for the feed to gain availability, while keeping payments strongly consistent

Tie choices to requirements and costs.

Lesson: Discussing Trade-offs and Failure Modes

24. What is the most realistic way to practise design rounds?

  1. Memorising one diagram per problem
  2. Reading many solutions without attempting them
  3. Timed mock interviews out loud with someone giving feedback
  4. Practising only the problems you already know
Show answer

Answer: Timed mock interviews out loud with someone giving feedback

Simulate the real conditions.

Lesson: A Practice Plan and Problem List

25. Which belongs on a design interview checklist?

  1. Avoiding any mention of failures
  2. Skipping requirements to save time
  3. Labelling estimates as assumptions and explaining trade-offs
  4. Using every design pattern you know
Show answer

Answer: Labelling estimates as assumptions and explaining trade-offs

Structure, honesty and judgement.

Lesson: Final Design Interview Checklist

← Back to the course