I am having a general problem finding a good algorithm for generating each possible assignment for some integers in different arrays.
Lets say I have n arrays and m
This smells like recursion. First calculate the combinations for putting m-1 in n arrays. Then you get n more solutions by putting the first number in either of the n arrays in those solutions.