Search
⌘K

Leetcode 875. Koko Eating Bananas

Find the minimum integer eating speed k such that the total hours required (sum over piles of ceil(piles[i]/k)) is ≤ h; because the required hours decreases monotonically with k, this is solved by binary searching k between 1 and max(piles).

Asked at:

DoorDash

Microsoft

Microsoft

Oracle


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Mid January, 2026

Microsoft

Microsoft

Senior

Mid January, 2026

Oracle

Senior

They asked Koko eating bananas binary search question but changed the wording to machine learning context. They replaced piles with data sample size and asked for min batch size for which we will satisfy the batch count threshold

Mid December, 2025

DoorDash

Senior

Comments

Your account is free and you can post anonymously if you choose.