Minimum Daily GPU Budget to Replay Ordered Scenarios
Last updated: November 29, 2026
Quick Overview
Scenarios in a seeded replay chain must run in a fixed order, each day processes a contiguous block, and a day's total GPU-minutes cannot exceed its capacity. Return the smallest integer daily capacity that finishes all scenarios within D days.
Applied Intuition
November 29, 20260
0
0 solved
Scenarios in a seeded replay chain must run in a fixed order, each day processes a contiguous block, and a day's total GPU-minutes cannot exceed its capacity. Return the smallest integer daily capacity that finishes all scenarios within D days.
Simulation capacity planning is a recurring theme at Applied Intuition. The interviewer is checking binary search on the answer: spotting the monotone feasibility predicate, picking tight bounds, and writing a greedy check.
What the Interviewer Expects
- Identify that feasibility is monotone in capacity
- Set bounds to max(duration) and sum(durations)
- Write a linear greedy check for days needed
- Binary search to the smallest feasible value
- State O(n log S) complexity
Key Topics to Cover
How to Approach This
- Clarify input constraints and edge cases before writing code.
- Walk through your approach verbally and confirm with the interviewer before coding.
- Start with a brute force solution, then optimize. Mention time and space complexity.
- Test your solution with examples, including edge cases like empty input or duplicates.
- Consider common patterns: sliding window, two pointers, hash map, BFS/DFS, dynamic programming.
Possible Follow-up Questions
- How would you also return the split points per day?
- What if days have different capacities?
- What if the order constraint is removed?
- How would you handle fractional capacities?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice DSA ProblemsSample Answer
Requirements
durations are positive integers in GPU-minutes; order is fixed; D is at least 1. Return the minimum integer capacity. A single scenario cannot be split across days....
High-Level Design
If capacity C works, any larger capacity also works, so the answer is the boundary of a monotone predicate. For a given C, greedily pack scenarios into the current day until the next would overflow, t...
Submit Your Answer
Applied Intuition Software Engineer Interview Guide
Interview process, tips, and preparation timeline