Reported August 2026
Nuroprefix sum

Schedule Buffered Video Playback

Reported by candidates from Nuro's online assessment. Pattern, common pitfall, and the honest play if you blank under the timer.

Get StealthCoderRuns invisibly during the live Nuro OA. Under 2s to a working solution.
Founder's read

Nuro reported this one in August 2026, and the input size is the first thing to read. With up to 100000 frames and read times up to 10^9, you can't simulate start times one by one or search blindly. The problem looks like a scheduling puzzle, but it collapses to a prefix sum plus a max. If you've got the OA coming up, this is a short problem once you see it. StealthCoder sits invisibly on your screen as a safety net if you blank on the formula mid-assessment.

The problem

A video contains one ordered frame per entry in readDurations. Reading begins at time 0. Frame i takes readDurations[i] milliseconds to read, and the next read begins immediately after the previous one finishes.
Playback must render every frame in order at exactly 25 frames per second. Therefore, if playback starts at time start, frame i is rendered at time start + 40 * i. A frame may be rendered exactly when its read finishes, but never before it is ready.
Use one sequential reader and one sequential renderer: read calls never overlap other read calls, render calls never overlap other render calls, and the read and render sequences may overlap each other.
Choose the earliest nonnegative playback start that prevents buffer underflow for every frame. Return an array containing the render timestamp of each frame.

Function
scheduleVideoFrames(readDurations: long[]) → long[]

Examples
Example 1
readDurations = [10,10,10]
return = [10,50,90]
The frames become ready at times 10, 20, and 30. Starting playback at time 10 is sufficient, so the render calls occur at 10, 50, and 90.
Example 2
readDurations = [70,70,10]
return = [100,140,180]
The first two frames become ready at times 70 and 140. A start before 100 would request the second frame before it is ready. Starting at 100 is the earliest underflow-free choice.
Example 3
readDurations = [0,100,0]
return = [60,100,140]
The second frame is not ready until time 100. A playback start of 60 schedules that frame at time 100 while retaining the exact 40-millisecond cadence.

Constraints
1 <= readDurations.length <= 100000.
0 <= readDurations[i] <= 10^9.
Every cumulative read time and render timestamp fits in a signed 64-bit integer.

Reported by candidates. Source: FastPrep

Pattern and pitfall

Frame i is ready at ready[i], the prefix sum of readDurations through i. Frame i renders at start + 40*i, and that must be >= ready[i]. So start >= ready[i] - 40*i for every i. The earliest valid start is the max of those values, clamped at 0 since start is nonnegative. Then output start + 40*i for each frame. That's one pass, O(n) time, O(n) output. Check example 2: ready is 70, 140, 150. Values are 70, 100, 70. Max is 100, so renders are 100, 140, 180. The pitfall is overflow in weaker languages, since sums can reach 10^14, so use 64-bit. Another is forgetting the clamp at 0. Don't binary search or simulate, it's unnecessary. If the formula slips away live, StealthCoder can hand you the one-pass solution while you keep your cool.

The honest play: practice the pattern, and have StealthCoder ready for the one you didn't see coming.

If this hits your live OA

You can drill Schedule Buffered Video Playback cold, or you can hedge it. StealthCoder runs invisibly during screen share and surfaces a working solution in under 2 seconds. The proctor sees the IDE. They don't see what's behind it. Built for the candidate who saw this exact problem leak two days before his OA and wondered if anyone had a play.

Get StealthCoder

Related leaked OAs

⏵ The honest play

You've seen the question. Make sure you actually pass Nuro's OA.

Nuro reuses patterns across OAs. Built for the candidate who saw this exact problem leak two days before his OA and wondered if anyone had a play. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Schedule Buffered Video Playback FAQ

What's the trick in the Nuro buffered video playback problem?+

Turn the constraint into a max. Each frame needs start + 40*i >= its ready time, which is the prefix sum of read durations. So start equals the max of (prefix[i] - 40*i), floored at 0. Then add 40*i to get each render time.

How hard is this problem really?+

Easy once you see the formula, medium if you try simulating or binary searching first. The code is about ten lines. The difficulty is recognizing that reads are independent of rendering, so frame ready times are just cumulative sums.

Do I need binary search on the start time?+

No. You could binary search since feasibility is monotonic, but it's extra work and extra bugs. A single pass computing the max of prefix[i] - 40*i gives the exact answer in O(n), which is cleaner and faster.

What edge cases should I test?+

Test all zero durations, which should give start 0 and renders 0, 40, 80. Test a single frame, where start equals its read time. Test huge durations near 10^9 with 100000 frames to confirm you use 64-bit integers for sums.

How do I prepare for this in 48 hours?+

Practice prefix sums and the pattern of turning per-element constraints into a max or min over a lower bound. Write this solution once from memory, then check examples 1 to 3 by hand. That covers the whole problem.

Problem reported by candidates from a real Online Assessment. Sourced from a publicly-available candidate-aggregated repository. Not affiliated with Nuro.

OA at Nuro?
Invisible during screen share
Get it