InterviewLegend

Graphs, Heaps & DP

Alex Chen20 min readGuide updated 181 real interview reports

Each of the six Netflix problems here makes you build a structure before you can search it. That might be a dependency graph over media assets, a graph of one-letter word changes, a grid of degraded Open Connect nodes, a catalog tree, a map of play counts or a table over a Premium question. From there, dependency order is Kahn's topological sort, a shortest path over equal-weight moves is breadth-first search, a Trending Now row is a top-k count with buckets or a size-k heap, and filling a Premium question is bottom-up DP, where greedy fails.

Netflix's hiring is decentralized, and each team chooses its own problem, so it's the kinds of problem that carry from panel to panel, more than any list of titles. The word-change shortest path is asked in Netflix screens often enough to rank second only to the intervals family.

The working method these problems assume, naming the pattern before you write it and talking through edge cases as you go, is covered in Patterns & OO Design, along with the design round and the sliding windows.

NetflixPremium lesson · Coding round

The 6 Netflix problems are below.

  1. A Premium questionCoding · Medium
  2. A Premium questionCoding · Medium
  3. A Premium questionCoding · Hard

+ 3 more in this lesson

Each with hints, the follow-up and a tested solution.

Get the Netflix questions

$49 a year · all 122 companies · instant access

181 Netflix interview reports · guide updated

Netflix interview guide

Know what Netflix asks before you walk in.

20 coding · 9 system design · 19 behavioral questions

Get Premium$49 a year · Instant access
Or start freeNo card.

Get their questions first.

Had your Netflix interview?How we research

InterviewLegend is independent and not affiliated with or endorsed by any company it covers.