Frontend System Design: Build an Autocomplete
A structured walkthrough of the autocomplete design round: requirements, architecture, race-free fetching, caching, rendering, the ARIA combobox and metrics.
A structured walkthrough of the autocomplete design round: requirements, architecture, race-free fetching, caching, rendering, the ARIA combobox and metrics.
What lexical scope and closures really are, why the var + setTimeout loop prints 3 3 3, three ways to fix it, and where closures earn their keep in real code.
Ten generics questions, from constraints and keyof to infer, distributive conditional types and variance, each with a short answer and code you can reproduce.
How the call stack, task queue and microtask queue fit together, where rendering happens, how async/await schedules work, and output puzzles with answers.
Stale closures, missing cleanup, fetch races, Strict Mode's double run, infinite loops and effects you don't need, plus how useLayoutEffect differs in timing.
How JavaScript decides what this refers to: default, implicit, explicit and new binding, the order they win in, why arrow functions ignore them, and the bugs that follow.
How Angular decides when to update the DOM: the tree walk, what Zone.js did, what marks an OnPush component dirty, and how signals make zoneless apps possible.
What the engine sets up before your code runs, why var reads as undefined while let throws, how the temporal dead zone works, and why const doesn't mean immutable.
Declaration merging, extends vs intersections, what only type aliases can express, and the few differences that change behavior, with a clear rule of thumb.
Render vs commit, the diffing rules React relies on, why index keys break inputs, how a key resets state, and what Fiber and batching change about updates.
How the prototype chain resolves properties, what __proto__ and prototype each mean, what new and class do under the hood, and how to wire up inheritance by hand.
The four RxJS flattening operators differ in one thing: what happens when a new value arrives while the previous inner observable is still running.
Build debounce and throttle the way interviewers expect: timelines, this and args, cancel(), leading and trailing edges, and how to test them.
Reimplement Partial, Pick, Omit, Exclude, ReturnType, Awaited and friends with mapped and conditional types, plus modifiers, key remapping and template literals.
Why components re-render, what memo really compares, how referential equality decides everything, when memoization is wasted, and where the React Compiler fits.
How Angular finds a dependency: element and environment injectors, providedIn root, provider recipes, InjectionToken, resolution modifiers and duplicate singletons.
What libuv does on each turn of the loop, where nextTick, promises, setImmediate and timers really run, and how to keep CPU-heavy work from blocking everything.
How the browser decides which CSS rule wins (origin, @layer, specificity, order), how inheritance and box-sizing work, and why z-index sometimes seems broken.
Implement Promise.all with native semantics, then allSettled, race, any and a concurrency-limited pool, plus the edge cases interviewers probe.