
Netflix Interview Questions
30 real coding interview questions recently asked at Netflix, spanning System Design Coding and Algorithms, with a real difficulty tag and a direct LeetCode link for every question.
By DevsUnite · 30 Problems
Total Problems: 30Difficulty Levels:EasyMediumHard
A design problem requiring O(1) get and put operations with least-recently-used eviction, implemented by combining a hash map (for O(1) lookup) with a doubly linked list (for O(1) reordering and eviction from either end). This exact structure underlies real inference key-value caches — it's reportedly one of the most frequently asked design questions at companies building LLM inference systems, since eviction policy for a bounded cache maps directly onto managing GPU memory for attention KV caches. It's a strong test of whether a candidate can compose two data structures to get O(1) across every required operation, not just some of them.
This design problem asks for a counter that records hits with timestamps and can report the number of hits in the past 300 seconds. It's typically implemented with a queue (or a fixed-size circular buffer of timestamp/count pairs) that evicts entries falling outside the trailing time window as new hits arrive. It tests whether a candidate can design a data structure for a sliding time window under both single-hit and (in a common follow-up) batched-hit conditions.
A foundational data-structure design problem: implement insert, search, and startsWith operations for a prefix tree, typically using nested hash maps or fixed-size child arrays per node. It tests whether a candidate understands how tries achieve O(L) lookups (L = word length) independent of dictionary size, and can reason cleanly about node structure and end-of-word marking. It's a common warm-up before harder trie-based follow-ups like wildcard search or autocomplete, and is frequently used to gauge comfort with recursive tree-like structures.
A streaming-median design problem solved with two heaps: a max-heap holding the smaller half of seen values and a min-heap holding the larger half, rebalanced after each insertion so the median is always derivable from the heaps' tops in O(log n) per insert and O(1) per query. It tests whether a candidate can design a data structure that supports an evolving statistic under continuous insertion, a pattern that generalizes to other streaming-aggregate problems. Correctly maintaining the size invariant between the two heaps is the main source of bugs.
A design problem: encode a binary tree into a string and reconstruct an identical tree from that string, typically via a preorder traversal with explicit null markers, or a BFS-based level encoding. The candidate must design a format that's unambiguous enough for deserialization to rebuild structure without extra information. Interview relevance frequently maps to data persistence — serializing structured data for storage or transmission and reliably reconstructing it — which is why it shows up across companies handling tree-like or hierarchical data on disk or over the wire.
A design problem requiring a hash map from key to a list of (timestamp, value) pairs, plus binary search to efficiently find the value at or before a queried timestamp. It tests whether a candidate can combine a hash map with binary search rather than resorting to a linear scan, since values are appended with strictly increasing timestamps. It's a natural fit for companies dealing with versioned or time-stamped storage — Anthropic and OpenAI probe it in the context of retrieving the right version of a model checkpoint by timestamp, a real pattern in ML infrastructure.
A design problem: implement a logger that only allows a given message to be printed once every 10 seconds, ignoring duplicate calls within that window. The straightforward solution is a hash map from message to the last timestamp it was allowed through, checked and updated on each call. It's a lightweight design problem mainly testing clean state management for a rate-limiting rule rather than any advanced algorithm.
A design problem: implement a stack that supports push, pop, top, and retrieving the minimum element, all in O(1) time. The standard approach keeps a second auxiliary stack that tracks the running minimum alongside the main stack (or stores each element paired with the current minimum at push time), so the minimum is always available without rescanning. It's a compact but effective test of augmenting a basic data structure with just enough extra state to support a new O(1) query.
Log in to save your progress, favorites, and notes to your account.
Frequently asked questions
What coding interview questions does Netflix ask?
This page tracks 30 real, recently reported Netflix coding interview questions, organized by topic: System Design Coding and Algorithms.
How many Netflix interview questions are on this list?
30 questions in total: 1 Easy, 20 Medium, and 9 Hard, each linked to its real LeetCode problem page.
Is it free to use?
Yes. Browsing every problem on this page is completely free, with no account required. Creating a free DevsUnite account lets you save your checked-off progress, star favorites, and add personal notes that sync across devices.
Do I need an account to track my progress?
You can read and solve every problem without logging in. An account is only required to mark a problem as done, star it, or add a note. Those actions save to your account instead of resetting on refresh.