I am struggling about a recursion problem, which should not be too hard, but for some reason I don't come up with a solution.
I have an array of size "n" and I want to count up each element from 0 to n in a way that I get each possible combination.
n = 3
[0,0,0]
[0,0,1]
[0,1,0]
[1,0,0]
[... ]
[3,3,3]
Can anyone help?
homeworktag is not to be used anymore. Questions, even those about homework, need to stand on their own without being too localized or requiring us to pussyfoot around the solution.