Search
⌘K

Leetcode 2226. Maximum Candies Allocated to K Children

Given piles you can split but not merge, find the largest integer x such that you can form at least k piles of size x (i.e., sum floor(candies[i]/x) >= k). This is typically solved by binary-searching the possible pile size x and checking feasibility.

Asked at:

Meta


Question Timeline

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

Early August, 2025

Meta

Senior

Comments

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