← All problems

Koko Eating Bananas

Medium searchingmath LeetCode ↗
Minimum integer eating speed k to finish all piles within h hours.

Hints (0/3 revealed)

Log in to reveal hints progressively.

Complexity

Time O(n log max), Space O(1)

Common pitfalls

  • Floating-point ceil errors (use integer math)
  • Wrong search bounds

Your solution

Log in to save your code and track progress.