Netflix logo

Netflix Frontend Engineer Coding Questions

36 practice questions for Netflix Frontend Engineer interviews

Netflix frontend engineer interviews emphasise JavaScript, DOM manipulation, CSS, accessibility, browser APIs, and UI component architecture.

All Roles Software Engineer Backend Engineer Frontend Engineer Full Stack Engineer Mobile Engineer Data Engineer Data Scientist ML Engineer DevOps Engineer DevOps Engineer Product Manager SRE Security Engineer Engineering Manager Data Analyst UX/UI Designer QA Engineer
coding Easy Verified Question #1

1. Label Co-occurrence Finder


Category: String coding problem
You are given a list of label groups and a list of required labels. Each group is a list of strings. A group is considered valid if it contains every...
Input: Array of strings
Output: Array
coding Medium Verified Question #2

2. Region Grid Coloring


Category: Grid/matrix coding problem
You are given an M x N grid of security zones. Each cell contains one of the following values: - 1 -- the zone is cleared - 0 -- the zone...
Input: 2D grid
Output: Computed result
coding Medium Verified Question #3

3. Parallel Task Batching


Category: Graph coding problem
A pipeline must execute a set of tasks with dependency constraints. Each dependency [A, B] means task A must complete before task B can start....
Input: Graph (nodes and edges)
Output: Computed result
coding Medium Verified Question #4

4. Maximum Interval Overlap


Category: Interval-based coding problem
You are given a list of closed intervals on the number line, where each interval [start, end] includes both endpoints. Find the maximum number of...
Input: List
Output: Integer
coding Hard Verified Question #5

5. Interval Coverage Counter


Category: Interval-based coding problem
Given a list of closed intervals on the integer number line, build a data structure that efficiently answers point-coverage queries. A closed...
Input: List
Output: Computed result
coding Easy Verified Question #6

6. [CodeSignal] Movie Group Ranker


Category: Array coding problem
You are building a movie recommendation system. Given a source movie a user liked, you receive: - An array scores where scores[i] is the...
Input: Array
Output: Integer
coding Easy Verified Question #7

7. [CodeSignal] One-Hot Encoder


Category: Matrix coding problem
Given an integer array arr, return its one-hot encoded matrix as a 2D array. In a one-hot encoding: - Each row represents one element from arr. -...
Input: Matrix (2D array)
Output: Computed result
coding Medium Verified Question #8

8. Event Rate Limiter


Category: String coding problem
Design a rate-limited event logger for a streaming system. Events arrive in non-decreasing timestamp order. The system must suppress an event name if...
Input: String
Output: Printed output
coding Medium Verified Question #9

9. Viewing History Friends


Category: Algorithm coding problem
A streaming platform groups customers together based on shared viewing habits. You receive: - customerIds - a list of distinct customer IDs -...
Input: List
Output: Array
coding Hard Verified Question #10

10. Weight-Based Cache


Category: String coding problem
# Weight-Based Cache
Input: List
Output: Computed result
coding Hard graph #1

1. [OA] Graph Traversal — Optimize genre recommendations for users

To enhance user experience and engagement, Netflix needs a system to recommend new content based on users’ viewing histories and preferences. It’s essential to identify connections between different genres and what combinations drive user engagement.
Given a directed graph represented by an adjacency list where nodes represent genres and edges indicate recommended connections, implement a function to traverse the graph and return all genres reachable from the source genre in a list.
- Implement getRecommendedGenres(genres: List[List[int]], start: int) -> List[int] which outputs all genres reachable from the start genre in any order.
Example 1:
Input: genres = [[1,2],[2,3],[3,4],[5],[]], start = 0
Output: [1, 2, 3, 4]
Explanation: Starting from genre 0, we can reach genres 1, 2, 3, and 4 through multiple recommendations.
Example 2:
Input: genres = [[1,2],[],[3],[],[]], start = 1
Output: []
Explanation: Genre 1 has no further recommendations.
Constraints:
- 1 <= len(genres) <= 1000
- 0 <= genres[i].length <= 100
coding Hard sliding window #2

2. [OA] Sliding Window — Track user viewing sessions in real-time

In a dynamic streaming platform like Netflix, understanding user engagement through the length of current viewing sessions is crucial for optimizing content delivery and recommendations.
Given a list of int representing session durations where each duration is the time in seconds a user has spent watching content, return the maximum number of unique sessions in any continuous window of time.
- You need to implement a function maxUniqueSessions(durations: List[int], k: int) -> int that returns an int representing the maximum number of unique sessions in any window of length k.
Example 1:
Input: durations = [1, 2, 3, 2, 4, 1], k = 4
Output: 4
Explanation: The unique sessions in the window of the last four durations are 2, 3, 4, 1, resulting in four unique sessions.
Example 2:
Input: durations = [3, 3, 3, 3, 3], k = 2
Output: 1
Explanation: All durations are the same; hence, the maximum unique sessions is 1.
Constraints:
- 1 <= len(durations) <= 10^5
- 0 <= durations[i] <= 10^5
- 1 <= k <= len(durations)

Related Netflix Frontend Engineer interview prep

Start practicing Netflix questions

Sign up for free to access walkthroughs, AI-generated questions, and more.

Get Started Free