Koko has n piles of bananas, piles[i] in the ith pile, and h hours before the guards return. Each hour she picks one pile and eats k bananas from it; if the pile has fewer than k, she eats all of it and eats nothing more that hour. Return the minimum integer k that lets her finish every pile within h hours.
Practise this challenge
All coding challenges