Learning on Web Dev Open is free for all.

Interview PrepCode
← Practice

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

Medium

12
  1. 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
  2. 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
  3. Retry with exponential backoff and jitterEasy to write, easy to write in a way that makes an outage worse.Async · Resilience · Distributed systems25 min
  4. 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
  5. 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
  6. 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
  7. Search a rotated sorted arrayBinary search where half the usual reasoning no longer holds.Binary search · Invariants · Off-by-one25 min
  8. Serialize and deserialize a binary treeAny traversal will serialize it. Only some of them can rebuild it.Trees · Recursion · Encoding30 min
  9. Build a star rating controlEveryone builds the hover. The marks are in the keyboard and the form.UI · Accessibility · State35 min
  10. 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
  11. Order tasks with dependenciesA topological sort wearing a build system, and the cycle you have to report usefully.Graphs · Topological sort · Cycle detection30 min
  12. Find a memory leakHeap grows 8MB an hour, nothing crashes for two days, and the suspect list is short.Debugging · Memory · Closures · Listeners30 min