Output the number of ways to distribute n labelled balls among k identical boxes (some of which might be empty).
Example:
n = 4;
k = 3;
Output = 14;
Solution Stats
Problem Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers11
Suggested Problems
-
Return the 3n+1 sequence for n
8534 Solvers
-
166 Solvers
-
Construct an index vector from two input vectors in vectorized fashion
461 Solvers
-
Calculate the Hamming distance between two strings
349 Solvers
-
Optimally fill a container with elements of different sizes
25 Solvers
More from this Author65
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!