# Netflix Coding Interview Questions: 30 LeetCode Problems

> 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.

Canonical: https://devsunite.com/resources/faang-interview-questions/netflix
Last updated: 2026-11-22

## Netflix Coding Interview Questions

By DevsUnite · Total problems: 30 · Difficulty levels: Easy, Medium, Hard

## System Design Coding

- [LRU Cache](https://leetcode.com/problems/lru-cache) (LeetCode, Medium)
  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.
- [Design Hit Counter](https://leetcode.com/problems/design-hit-counter) (LeetCode, Medium)
  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.
- [Implement Trie (Prefix Tree)](https://leetcode.com/problems/implement-trie-prefix-tree) (LeetCode, Medium)
  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.
- [Find Median from Data Stream](https://leetcode.com/problems/find-median-from-data-stream) (LeetCode, Hard)
  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.
- [Serialize and Deserialize Binary Tree](https://leetcode.com/problems/serialize-and-deserialize-binary-tree) (LeetCode, Hard)
  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.
- [Time Based Key-Value Store](https://leetcode.com/problems/time-based-key-value-store) (LeetCode, Medium)
  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.
- [Logger Rate Limiter](https://leetcode.com/problems/logger-rate-limiter) (LeetCode, Easy)
  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.
- [Min Stack](https://leetcode.com/problems/min-stack) (LeetCode, Medium)
  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.

## Algorithms

- [Merge Intervals](https://leetcode.com/problems/merge-intervals) (LeetCode, Medium)
  Given a collection of intervals, merge all overlapping ones. The standard approach sorts intervals by start time, then does a single linear pass, extending the current merged interval whenever the next one overlaps and starting a new one otherwise. It's a foundational interval problem that shows up across many companies because interval merging underlies a large family of harder scheduling and calendar-style questions.
- [Meeting Rooms II](https://leetcode.com/problems/meeting-rooms-ii) (LeetCode, Medium)
  This is a classic interval-scheduling problem: given a list of meeting time intervals, find the minimum number of rooms required so no two overlapping meetings share a room. The standard approach sorts start and end times separately (or uses a min-heap of end times) and sweeps through them, tracking how many meetings are simultaneously active to determine the peak concurrent overlap, which equals the answer. It's a strong, well-known signal for interval-scheduling reasoning, and its overlap-counting technique generalizes directly to resource-allocation and scheduling problems in real systems.
- [Course Schedule II](https://leetcode.com/problems/course-schedule-ii) (LeetCode, Medium)
  A classic topological-sort problem: given courses and prerequisite pairs, return a valid ordering (or detect that no valid ordering exists due to a cycle). It tests whether a candidate can build an adjacency list, track in-degrees, and run Kahn's BFS algorithm (or DFS with visited/in-progress marking) to order and cycle-detect simultaneously. Its broad company reach reflects how often real systems need this exact shape of problem (resolving build or package dependency order, or task scheduling graphs), making it a reliable signal for graph traversal fluency.
- [Network Delay Time](https://leetcode.com/problems/network-delay-time) (LeetCode, Medium)
  Given a weighted directed graph and a source node, the task is to find how long it takes for a signal to reach every other node, which is a direct application of Dijkstra's shortest-path algorithm (typically implemented with a min-heap priority queue). It tests whether a candidate can correctly implement Dijkstra's, including handling unreachable nodes and returning the maximum of all shortest distances (or -1 if some node is unreachable) rather than a sum. It's a common signal for graph and shortest-path fluency, a pattern that shows up widely in network and routing-style interview questions.
- [Top K Frequent Elements](https://leetcode.com/problems/top-k-frequent-elements) (LeetCode, Medium)
  Requires counting element frequencies with a hash map, then selecting the k most frequent using either a heap (O(n log k)) or bucket sort by frequency (O(n)). It's a common building block for ML preprocessing workflows (identifying the most frequent tokens, features, or events in a dataset before further processing), which is part of why it recurs in ML-adjacent interview loops. The bucket-sort approach in particular tests whether a candidate recognizes that frequency is bounded by array length and can exploit that to avoid a full sort.
- [Trapping Rain Water](https://leetcode.com/problems/trapping-rain-water) (LeetCode, Hard)
  Given an elevation map, compute how much water it can trap after rain; the water trapped at each index equals the shorter of the tallest bars to its left and right, minus its own height. It's solvable with two pointers in O(1) extra space, with a monotonic stack, or with two precomputed max-prefix/max-suffix arrays, making it a great vehicle for comparing multiple valid techniques in one interview. Its breadth of companies asking it reflects that it's one of the most widely used checks of two-pointer/array reasoning in the entire interview circuit.
- [Daily Temperatures](https://leetcode.com/problems/daily-temperatures) (LeetCode, Medium)
  Given a list of daily temperatures, find for each day how many days you'd have to wait until a warmer temperature. It's a canonical monotonic-stack problem: maintaining a decreasing stack of indices and resolving them, computing the wait, whenever a warmer day is encountered. It's a strong, quick check on whether a candidate recognizes the monotonic-stack pattern rather than defaulting to a brute-force O(n^2) scan.
- [Edit Distance](https://leetcode.com/problems/edit-distance) (LeetCode, Medium)
  The classic Levenshtein distance problem: compute the minimum number of insert/delete/replace operations to transform one string into another. It's solved with a 2D dynamic programming table where dp[i][j] represents the edit distance between the first i and j characters of each string, built from the standard recurrence over matching/non-matching characters. It's one of the most canonical DP-on-two-strings problems in interviewing and a strong signal for whether a candidate can derive a DP recurrence from first principles rather than recalling it by rote.
- [Minimum Window Substring](https://leetcode.com/problems/minimum-window-substring) (LeetCode, Hard)
  Find the smallest substring of a string s that contains every character of another string t (respecting character multiplicities). The solution is a variable-size sliding window with a hash map of required character counts and a counter tracking how many distinct required characters are currently satisfied, expanding the right pointer until the window is valid and then greedily shrinking from the left. It's a step up from basic sliding-window problems because of the 'expand until valid, then shrink while still valid' two-phase logic, which trips up candidates who haven't internalized the pattern.
- [Koko Eating Bananas](https://leetcode.com/problems/koko-eating-bananas) (LeetCode, Medium)
  A binary-search-on-the-answer problem: find the minimum eating speed that lets Koko finish all banana piles within h hours. Because a higher speed always finishes in fewer-or-equal hours (a monotonic relationship), the candidate binary searches over possible speeds and uses an O(n) greedy check (summing ceil(pile/speed) for each pile) to test feasibility at each candidate speed. It's a frequently reused pattern-recognition test for spotting monotonic feasibility problems that don't look like a search problem on the surface.
- [Rotating the Box](https://leetcode.com/problems/rotating-the-box) (LeetCode, Medium)
  This problem simulates the effect of gravity: given a box represented as a grid with obstacles, stones, and empty cells, rotate it 90 degrees clockwise and determine where the stones settle after gravity pulls them down. The core technique is processing each original row with a two-pointer (or last-empty-slot tracking) sweep to slide stones toward obstacles before performing the actual matrix rotation, which keeps the simulation at a manageable O(rows x cols). It's a good test of decomposing a slightly unusual physical-simulation problem into two simpler, well-understood subproblems (gravity simulation, then matrix rotation).
- [Merge k Sorted Lists](https://leetcode.com/problems/merge-k-sorted-lists) (LeetCode, Hard)
  Merging k sorted linked lists efficiently requires either a min-heap holding the current head of each list (repeatedly popping the smallest and pushing its successor) or a divide-and-conquer pairwise merge, both achieving O(N log k). It tests whether a candidate can extend the two-list merge pattern to k lists and reason about the resulting complexity rather than defaulting to an O(Nk) linear scan across lists. Correct pointer management across multiple linked lists under time pressure is the practical difficulty.
- [Word Search II](https://leetcode.com/problems/word-search-ii) (LeetCode, Hard)
  Given a grid of letters and a list of target words, find every word that can be traced as a path of adjacent cells. The efficient solution builds a Trie from all target words, then does a DFS/backtracking search from every cell, using the Trie to prune paths that can't possibly extend into any remaining word. It's a strong signal problem because it requires combining two separate techniques (Trie construction and grid backtracking) rather than applying either in isolation.
- [Reconstruct Itinerary](https://leetcode.com/problems/reconstruct-itinerary) (LeetCode, Hard)
  Given a list of airline tickets as source-destination pairs, the task is to reconstruct the itinerary that uses every ticket exactly once, starting from a fixed origin and preferring lexicographically smaller destinations when there's a choice -- essentially finding an Eulerian path. The standard solution builds an adjacency structure (sorted or backed by a min-heap per node) and applies Hierholzer's algorithm, which does a DFS that removes edges as they're used and appends nodes to the itinerary in postorder, then reverses the result. It's a genuinely advanced graph problem that tests whether a candidate knows or can derive the Eulerian-path construction technique, well beyond simple traversal or shortest-path problems.
- [Alien Dictionary](https://leetcode.com/problems/alien-dictionary) (LeetCode, Hard)
  Given a list of words sorted according to an unknown alphabet's ordering, the task is to reconstruct a valid character ordering: build a directed graph of precedence constraints from adjacent word comparisons, then topologically sort it (Kahn's algorithm or DFS-based), detecting cycles as an invalid/impossible ordering. The task is conceptually similar to inferring a token ordering from partial, pairwise evidence, which is plausibly why it resonates with companies doing tokenizer/vocabulary-adjacent ML work. It's a solid test of translating a word-comparison problem into a graph and correctly handling topological sort edge cases (cycles, ties, unreachable characters).
- [Parallel Courses](https://leetcode.com/problems/parallel-courses) (LeetCode, Medium)
  Given a set of courses with prerequisite dependencies, the task is to find the minimum number of semesters needed to complete all of them (or detect that it's impossible due to a cycle), which is solved with a topological sort using Kahn's algorithm (BFS by in-degree), processing one full "layer" of available courses per semester. It tests whether a candidate can both perform topological sorting and adapt it to count levels/semesters rather than just producing a single ordering, plus correctly detect cycles when not all courses can be scheduled. This dependency-resolution pattern maps directly onto real build-system and task-scheduling problems.
- [Clone Graph](https://leetcode.com/problems/clone-graph) (LeetCode, Medium)
  You're given a reference to a node in a connected undirected graph and must produce a deep copy of the entire graph. The standard solution does a DFS or BFS traversal while maintaining a hash map from original nodes to their clones, so previously cloned nodes are reused instead of duplicated when revisited through a cycle. It's a strong, widely-used signal for graph traversal fundamentals plus correct handling of cycles and already-visited state, a very common building-block interview problem across big tech.
- [Course Schedule](https://leetcode.com/problems/course-schedule) (LeetCode, Medium)
  Given prerequisite pairs, this problem asks whether all courses can be finished, which is equivalent to detecting a cycle in a directed graph. Candidates typically solve it with Kahn's algorithm (in-degree tracking and a queue) for topological sort, or with DFS using a three-color (unvisited/visiting/visited) scheme to catch back edges. It tests fundamental graph modeling skills: representing prerequisites as an adjacency list and correctly distinguishing cycle detection from simple reachability.
- [Recover Binary Search Tree](https://leetcode.com/problems/recover-binary-search-tree) (LeetCode, Medium)
  Exactly two nodes in an otherwise-valid BST have been swapped, and the task is to identify and fix them, typically via an in-order traversal (Morris traversal for true O(1) space) that spots the one or two places where the sequence of visited values breaks the expected ascending order. The tricky part is correctly identifying the two swapped nodes whether they're adjacent in the in-order sequence or far apart, which requires careful tracking of the previous node and two candidate "first" and "second" swapped pointers. It's a strong signal for deep understanding of BST in-order properties combined with the discipline needed for the O(1)-space Morris traversal variant.
- [Product of Array Except Self](https://leetcode.com/problems/product-of-array-except-self) (LeetCode, Medium)
  Compute, for each index, the product of all array elements except the one at that index, without using division. The standard O(1)-extra-space solution builds a running prefix product and running suffix product in two passes, multiplying them together for the final answer. It tests array manipulation and space-optimization thinking, specifically whether a candidate can avoid the naive division-based shortcut and still hit optimal time and space.
- [Container With Most Water](https://leetcode.com/problems/container-with-most-water) (LeetCode, Medium)
  Given an array of heights, find two lines that, together with the x-axis, form the container holding the most water. The optimal solution uses two pointers starting from both ends, always moving the pointer at the shorter line inward (since moving the taller one can never increase the area), tracking the best area seen. It tests two-pointer greedy reasoning and, more importantly, whether a candidate can articulate why the greedy move is provably safe rather than just applying it by rote.
- [Department Top Three Salaries](https://leetcode.com/problems/department-top-three-salaries) (LeetCode, Hard)
  This is a SQL problem rather than a traditional algorithms question, testing whether you can rank rows within groups using window functions like DENSE_RANK() or a correlated subquery that counts higher salaries per department. The 'top three per group, with ties' requirement is the crux: a naive LIMIT-based approach fails, and comparing against DENSE_RANK is the standard clean solution. It's a solid signal for how comfortable a candidate is with grouped ranking logic in SQL, which is why it tends to surface in interview loops for data-adjacent roles rather than a general software engineering track.

## How to prepare for the Netflix coding interview with this list

These 30 questions are real, recently reported Netflix coding interview problems, each linked to its LeetCode page. The biggest group is Algorithms with 22 questions, so start there if you are short on time.

Solve each question without hints first, say your approach out loud as you would in the interview, then read the note under the problem to see what it tests. Mark questions done here to keep your progress across devices.

### Questions by topic

| Topic | Questions |
| --- | --- |
| System Design Coding | 8 |
| Algorithms | 22 |

### Difficulty split

- Easy: 1
- Medium: 20
- Hard: 9

### Where the questions are hosted

- LeetCode: 30

## Real interview experiences

First-hand interview stories from DevsUnite, plus DSA sheets to practice with.

- [Netflix interview process](https://devsunite.com/interview-process/netflix-interview-process) - Every stage of the Netflix software engineer interview, with sources
- [My Amazon SDE-1 Interview Experience as a Fresher (2026)](https://devsunite.com/blog/my-amazon-sde-1-interview-experience-as-a-fresher-2026) - Amazon interview experience
- [My Zepto SDE-1 Interview Experience as a Fresher (2026)](https://devsunite.com/blog/my-zepto-sde-1-interview-experience-as-a-fresher-2026) - Zepto interview experience
- [Getting Hired at Sarvam AI: My Fresher Interview Story](https://devsunite.com/blog/getting-hired-at-sarvam-ai-my-fresher-interview-story) - Sarvam AI interview experience
- [My Swiggy SDE-1 Android Interview Experience](https://devsunite.com/blog/my-swiggy-sde-1-android-interview-experience) - Swiggy interview experience
- [Striver's A2Z DSA Sheet](https://devsunite.com/resources/dsa-sheets/striver-a2z)
- [Rohit Negi DSA Sheet (Coder Army)](https://devsunite.com/resources/dsa-sheets/rohit-negi)

## 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.

## Related

- [FAANG Interview Questions](https://devsunite.com/resources/faang-interview-questions)
- [All interview prep resources](https://devsunite.com/resources)
