Coding Challenges

Build the thing with the right small abstraction.

Common implementation prompts grouped by shape, with concise TypeScript approaches for state, iteration, and API design.

5 patterns ยท 3 categories

Cache & State

Data structures with strict operations.2 patterns
๐Ÿ—„๏ธ
Implement LRU Cache
A cache where the oldest untouched entry leaves first.
โฑ๏ธ
Time-Based Key Value Store
Values live on a timestamped shelf.

Iterators & Streams

Pull values lazily and predictably.2 patterns
๐Ÿ”
Iterator Implementation
Pull one value at a time without exposing storage.
๐Ÿช†
Flatten Nested Iterator
A stack opens nested boxes only when needed.

API Design

Small surfaces with clear invariants.1 patterns
๐Ÿšฆ
Rate Limiter
Let only enough requests through the gate.