Koko loves to eat bananas. There are n piles of bananas, the i-th pile has piles[i] bananas. Find the minimum eating speed k such that Koko can eat all bananas within h hours.
Binary search on the answer: search speed k in range [1, max(piles)]. For a given k, compute hours needed = sum(ceil(pile/k)). If hours <= h, try smaller k.
- lo=1, hi=max(piles).
- For each mid speed, compute total hours needed.
- If hours <= h: possible, try smaller (hi=mid).
- Else: too slow, increase speed (lo=mid+1).
- Time Complexity: O(N log M) where M=max pile
- Space Complexity: O(1)