Loading…
Design questions ask you to build a data structure to an operation-level contract — LRU caches, rate limiters, min-stacks — with stated complexity targets.
Data structure design questions give you an interface rather than an algorithm: implement a cache with constant-time get and put, a stack that reports its minimum in constant time, a rate limiter, an iterator. The answer is nearly always a combination of two structures where each covers the other's weakness — a hash map for lookup paired with a linked list for ordering being the canonical example.
These are the closest coding questions get to system design, and interviewers treat them that way: they expect you to restate the operations and their required complexity before choosing structures. When a single structure cannot hit every target, saying so explicitly and then composing two is the intended path. Thread safety and eviction policy are common follow-ups, and they connect directly to the caching discussion in a system design round.
1 low-level design · 12 coding · 2/6/5 easy/medium/hard
They test composition rather than recall. There is no single textbook structure that satisfies the constraints, so the interviewer sees how you combine primitives and reason about the cost of each operation.
An LRU cache, because it forces the hash-map-plus-linked-list combination and has a natural follow-up path into eviction policy, concurrency, and distributed caching in the system design round.