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 Solvers10
Suggested Problems
-
Project Euler: Problem 1, Multiples of 3 and 5
3723 Solvers
-
273 Solvers
-
middleAsColumn: Return all but first and last element as a column vector
652 Solvers
-
convert matrix to single column
440 Solvers
-
Define the operators of function_handles
60 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!