Koko has n piles of bananas. The guards are gone for h hours. Each hour, Koko picks a pile and eats up to k bananas from it. If the pile has fewer than k, she eats them all and stops eating until the next hour.
Return the minimum integer k such that she can eat all bananas within h hours.
This problem uses binary search on the answer space — search for the smallest eating rate that is feasible.
1 ≤ piles.length ≤ 10⁴piles.length ≤ h ≤ 10⁹1 ≤ piles[i] ≤ 10⁹The answer is in the range [1, max(piles)].
4