NeetCode #276LC-875MediumBinary SearchNC 150NC 250
← Back to All Problems

#276 · #875 · Koko Eating Bananas(爱吃香蕉的珂珂)

📌 Problem Statement & Constraints

Koko has piles of bananas and h hours. Each hour she chooses a pile and eats k bananas from it; if the pile has fewer than k left, she finishes it and stops for that hour. Return the minimum integer k such that she can eat all the bananas within h hours. Constraints: 1 <= piles.length <= 10^4, piles.length <= h <= 10^9, 1 <= piles[i] <= 10^9.
🔒

Sign In to Unlock Full Solutions for All 973 Problems

Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!