Pick Simulcast Layers Per Stream Under a Bandwidth Budget

Last updated: November 29, 2026

Quick Overview

A subscriber can receive each participant's video at one of several simulcast layers, each with a bitrate and a utility score, or not at all; choose a layer per stream to maximize total utility without exceeding the subscriber's estimated downlink bandwidth.

Zoom
Coding & Algorithms
Software Engineer
Zoom
November 29, 2026
Software Engineer
Onsite
Coding & Algorithms
Hard

0

0

0 solved


A subscriber can receive each participant's video at one of several simulcast layers, each with a bitrate and a utility score, or not at all; choose a layer per stream to maximize total utility without exceeding the subscriber's estimated downlink bandwidth.

A harder onsite coding question tied to how a media router decides what each Zoom participant receives in gallery view. The interviewer wants you to recognize a multiple-choice knapsack, implement the DP with reconstruction, and then talk about whether the exact algorithm is affordable on a hot path.

What the Interviewer Expects
  • Model the problem as group (multiple-choice) knapsack
  • Write the DP with an explicit off option per stream
  • Reconstruct the chosen layer per stream
  • Give O(N * L * B) complexity and discuss discretizing bitrate
  • Propose a greedy or incremental alternative for real time
Key Topics to Cover
Dynamic programming
Group knapsack
Simulcast
Bandwidth estimation
Reconstruction
How to Approach This
  1. Clarify input constraints and edge cases before writing code.
  2. Walk through your approach verbally and confirm with the interviewer before coding.
  3. Start with a brute force solution, then optimize. Mention time and space complexity.
  4. Test your solution with examples, including edge cases like empty input or duplicates.
  5. Consider common patterns: sliding window, two pointers, hash map, BFS/DFS, dynamic programming.
Possible Follow-up Questions
  • The active speaker must always get at least its lowest layer; how does the DP change?
  • Bandwidth estimates update every 500 ms; how do you avoid recomputing from scratch and avoid layer thrashing?
  • When is a greedy by marginal utility per kbps optimal, and when does it fail?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice DSA Problems
Sample Answer
Requirements

Input: streams[i] is a list of (kbps, utility) layers, for example 180p, 360p, 720p of one sender, and an integer budget in kbps (we can work in 10 kbps units to keep it small). Each stream gets...

High-Level Design

This is a multiple-choice knapsack: the groups are streams and within a group you take at most one item. Let dp[b] be the best utility achievable with the streams seen so far using at most b kbps....


Submit Your Answer
Markdown supported

Related Questions