Koko Eating Bananas — binary search the speed
Faster eating always finishes sooner, so "fast enough" is monotonic. Binary-search the slowest speed for which the total hours still fit within h.
Try:
speed =
hours =