Code
8h of practice18 problems
The coding round still filters more candidates than anything else, and almost never because the algorithm was too hard. People lose it by starting to type before they have stated an approach, by never saying the complexity out loud, and by not testing the empty input.
These are the shapes that recur: a utility written from scratch, a data-structure question with an obvious wrong answer, a component built live, and a performance problem you have to read before you fix.
The round · Thirty to forty-five minutes in a shared editor. You will usually be asked to state the approach before you type, and almost always to handle the case you skipped.
Difficulty
Topic
18 problems
Easy
4- Implement debounce, then make it cancellableThe classic warm-up, and the follow-up that catches people who learned it by heart.Closures · Timers · this binding20 min
- Build an event emitterTwelve lines that work, and one edge case that almost everybody ships broken.Data structures · API design · Edge cases20 min
- Merge overlapping intervalsFive lines once you sort. The marks are in the boundary cases.Sorting · Greedy · Edge cases20 min
- Implement Promise.all from scratchTen lines, and three edge cases that separate a memorised answer from an understood one.Promises · Async · Edge cases20 min
Medium
12- Deep clone a valueSix lines get you 80%. The cycle and the Date get you the other 20%.Recursion · Reference cycles · Built-in types25 min
- Run tasks with a concurrency limitThe async question that most people get almost right, and the ordering detail that catches them.Async · Promises · Backpressure30 min
- Retry with exponential backoff and jitterEasy to write, easy to write in a way that makes an outage worse.Async · Resilience · Distributed systems25 min
- LRU cache in O(1)Both operations have to be constant time, which rules out the first thing everyone reaches for.Data structures · Hash maps · Linked lists30 min
- Top k most frequent elementsSorting works. The question is whether you can beat it, and whether you know when not to bother.Hash maps · Heaps · Bucket sort25 min
- Longest substring without repeating charactersThe canonical sliding window, and the one-line optimisation that makes it genuinely linear.Sliding window · Hash maps · Two pointers25 min
- Search a rotated sorted arrayBinary search where half the usual reasoning no longer holds.Binary search · Invariants · Off-by-one25 min
- Serialize and deserialize a binary treeAny traversal will serialize it. Only some of them can rebuild it.Trees · Recursion · Encoding30 min
- Build a star rating controlEveryone builds the hover. The marks are in the keyboard and the form.UI · Accessibility · State35 min
- Diagnose a slow page from its waterfallA trace, four plausible fixes, and only one of them is on the critical path.Performance · Networking · Debugging25 min
- Order tasks with dependenciesA topological sort wearing a build system, and the cycle you have to report usefully.Graphs · Topological sort · Cycle detection30 min
- Find a memory leakHeap grows 8MB an hour, nothing crashes for two days, and the suspect list is short.Debugging · Memory · Closures · Listeners30 min
Hard
2- Build an autocomplete comboboxAn async race, a keyboard contract, and a screen-reader announcement, in forty-five minutes.UI · Accessibility · Async · Race conditions45 min
- Render a list of 100,000 rowsWindowing is the easy part. Variable heights and keyboard access are where it goes wrong.UI · Performance · DOM · Accessibility40 min