ASAPUtils Logo ASAPUtils
Week 4

Koko Eating Bananas

Koko Eating Bananas derived as minimum-feasible binary search, with a monotone hours predicate, proven bounds, overflow-safe C++ and JavaScript solutions, complexity, and an interactive answer-space trace.

The problem

Koko chooses one integer eating speed k and spends each hour eating from one pile. Given the piles and total hours h, return the smallest k that lets her finish all piles in time.

piles = [3,6,7,11], h = 8 -> 4

Related Problems