Minimum Daily Volume Cap to Execute an Order Schedule
Last updated: November 29, 2026
Quick Overview
A parent order is split into child slices that must be executed in the given order across at most D trading days, each day taking a contiguous run of slices; find the smallest daily share cap that makes this possible.
Voleon
November 29, 20260
0
0 solved
A parent order is split into child slices that must be executed in the given order across at most D trading days, each day taking a contiguous run of slices; find the smallest daily share cap that makes this possible.
Voleon trades large positions and cares about market impact, so execution schedules with per-day participation caps are a natural framing. The interviewer is looking for binary search on the answer with a greedy feasibility check, and for a correct argument about monotonicity and bounds.
What the Interviewer Expects
- Recognize that feasibility is monotone in the cap
- Set bounds at max slice and total volume
- Write a greedy check that packs slices into days
- Get the binary search boundaries right (lower bound style)
- Analyze O(n log S) time
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 return the actual day assignment?
- What if slices may be split across days?
- What if each day has its own cap proportional to forecast volume?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice DSA ProblemsSample Answer
Requirements
Input: positive integer slice volumes in fixed order and days >= 1. Output: the minimum cap C such that slices can be grouped into at most days contiguous groups each summing to at most C....
High-Level Design
If cap C works, any larger cap also works, so the set of feasible caps is an upward-closed range and we can binary search for its smallest member. The cap can never be below the largest slice (that sl...