Minimum Eating Speed

Medium · Binary Search · about 20 minutes

Asked at Airbnb, DoorDash, Google, Roblox, Riot Games.

There are n piles of bananas and h hours. Each hour you choose one pile and eat up to k bananas from it. Find the minimum integer speed k that lets you finish all piles within h hours.

Related guides