Search
⌘K
Get Premium
Leetcode 2591. Distribute Money to Maximum Children
Given a total amount and number of children, allocate all money so each child gets at least $1 and nobody gets $4, and return the maximum number of children who can receive exactly $8 (or -1 if no valid distribution). This is a small greedy/resource-allocation problem with edge-case handling to avoid forbidden amounts.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.