Netflix coding / problem solving interview

Round 3 of 6 · 14 questions reported

See the whole loop
Format
Live coding on under-specified requirements
They grade
Clarifying questions and test quality as much as the final code

Questions Netflix asks in this round 14

  • Weighted cache that evicts the heaviest entriesCodingImplement WeightedCache, a key-value cache with a total-weight budget instead of an item count. Each entry has a positive integer weight. After every put, the sum of the weights…
    Last asked Sep 2026
  • Group dependent tasks into parallel levelsCodingYou run a build system. Each task has a unique, non-empty lowercase name. Some tasks depend on others: a dependency before, after means before must finish before after can start…
    Last asked Jun 2026
  • Print each tree node's level and whether it is balancedCodingGiven a tree, walk it with a depth-first search and report, for every node, its level and whether the subtree under it is balanced (by the definition the interviewer gives, such…
    Last asked Aug 2026
  • Command executor with undoCodingImplement a class that executes commands and can undo them: execute(command) applies it and records it, and undo() reverts the most recent command that has not been undone. Decide…
    Last asked Apr 2026
  • Sparse matrix multiplicationCodingMultiply two matrices that are mostly zeros. Store only the non-zero entries and skip work on zeros, and state the cost in terms of the number of non-zero entries.
    Last asked Sep 2026
  • Friend groups by matching last k moviesCodingA streaming service stores each customer's full viewing history, oldest title first. Two customers are friends when the set of their last k watched titles is the same. Order…
    Last asked Jan 2026
  • Co-occurring tags for a tag filterCodingEach title in a catalog carries a group of tags that were assigned together, for example "drama", "british", "crime". You get all the groups as a list of lists of strings, groups…
  • Count intervals covering a pointCodingBuild a data structure over a fixed list of closed intervals on the integer number line that answers many point queries quickly. An interval l, r covers a point x when l <= x <=…
  • K-th greatest value in every growing prefixCodingYou are given arr, a permutation of the integers 1 to n (each value appears exactly once), and an integer k with 1 <= k <= n. Read arr from left to right. After reading each…
  • One-hot encode an integer arrayCodingWrite onehot(arr: listint) - listlistint that returns the one-hot encoding of an integer array as a 2D list. - The matrix has one row per element of arr, in the same order. - It…
  • Rate-limited event loggerCodingBuild a logger that rate-limits repeated events in a stream. Each event has a string name and an integer timestamp in seconds. Timestamps arrive in non-decreasing order, and…
  • Two-colour a board with walls and fixed cellsCodingYou are given an M x N board as a matrix of integers. Each cell is one of: - 1: already painted black - 0: already painted white - 9: empty, still to be painted - -1: a wall…