Fade to Solo
Binary Search

Koko Eating Bananas

10 MINMleetcode ↗

Problem

Koko has piles of bananas and h hours before the guards return. Each hour she picks one pile and eats up to k bananas from it (if the pile has fewer than k, she finishes it and stops for that hour). Find the smallest integer eating speed k that lets her finish every pile within h hours.

10 MIN00:00unlocks in 10:00
locked10:00 left