Koko Eating Bananas - Binary Search on Answer

Instead of searching an array, you search over possible eating speeds. The key insight: if speed kk works, any speed >k> k also works. This monotonicity enables binary search.

1.1. Search range: [1,max(piles)][1, \max(piles)].

2.2. For each candidate speed mid, compute total hours needed: piles[i]/mid\sum \lceil piles[i] / mid \rceil.

3.3. If hours h\leq h, the speed works. Try smaller speeds (set right = mid).

4.4. If hours >h> h, speed is too slow. Set left = mid + 1.

5.5. Return left as the minimum valid speed.