#875

Koko Eating Bananas

medium· Binary Searchruns: 0

Koko loves to eat bananas. There are n piles of bananas; the ith pile has piles[i] bananas. The guards will return in h hours. Each hour Koko picks a pile and eats k bananas; if the pile has fewer than k, she eats all of it and waits. Return the minimum integer k such that she can finish all the bananas within h hours.

sign in to paste and practice your own solution
desktop only

codedrill is a typing game and needs a real keyboard. open this on a laptop or desktop to practice.

you can still browse problems and sections from your phone.