I would like to write a function that generate an array of tuples containing all possible permutations of N balls in M boxes in C++.
The order (Edit : in the resulti
List of combinations of N balls in M boxes = k + List of combinations of (N-k) balls in (M-1) boxes for every k from 0 to N. Try code this recursively.