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
3713 Solvers
-
Project Euler: Problem 2, Sum of even Fibonacci
2895 Solvers
-
middleAsColumn: Return all but first and last element as a column vector
652 Solvers
-
Volume difference between Ellipsoid and Sphere
136 Solvers
-
140 Solvers
More from this Author63
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!