We use cookies for site analytics. Accept to help us understand how the site is used. See our Privacy Policy for details.
Design problems ask you to compose primitives to hit a stated complexity: a hash map plus a doubly linked list for an LRU cache, two stacks for a queue, a heap plus a map for a leaderboard. The interview is as much about clean interfaces and edge-case handling as about the trick. Say the complexity of each operation aloud as you design - it is what is actually being graded.
"Design a class supporting these operations in O(1)" - an API rather than a single function.
24 problems. Each one runs in an in-browser editor against real test cases, with hints and a worked solution.
The patterns cheat sheet covers all of these in one page - what each one looks like in a problem statement, and the template that follows.