← Questions
Minimum hourly rate to empty every vault in time
0
I was asked this
No reports yet. Sign in to say where you were asked it.
A row of vaults holds vaults[i] units each, and there are h hours. Each hour you can take up to k units from one vault only; leftover capacity in that hour does not carry over to another vault.
Return the smallest integer k that empties every vault within h hours. This is the Koko-eating-bananas problem: binary search on k with a greedy check.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Sign in to submit your code; every attempt is kept here.
Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding
