Search
⌘K

Leetcode 2928. Distribute Candies Among Children I

Count the number of nonnegative integer triples (a, b, c) that sum to n with each value ≤ limit. This is a constrained stars-and-bars counting problem typically solved with combinatorics (inclusion–exclusion) or simple enumeration given small n and limit.


Question Timeline

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

Comments

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