NeetCode #278LC-2226MediumBinary Search
← Back to All Problems

#278 · #2226 · Maximum Candies Allocated to K Children(分配给 K 个孩子的最大糖果数)

📌 Problem Statement & Constraints

You are given a 0-indexed integer array candies where candies[i] is the number of candies in the i-th pile, and an integer k. Each child receives candies from a single pile, and piles cannot be split across children. Return the maximum number of candies each child can get. Constraints: 1 <= candies.length <= 10^5, 1 <= candies[i] <= 10^7, 1 <= k <= 10^12.
🔒

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!