Basically,
I need to program something using STACK, backtracking to make all the possible sum, of "n" numbers.
Example. If a user input 5.
n = 5
1: 1 1 1 1 1
2: 1 1 1 2
3: 1 1 3
4: 1 2 2
5: 1 4
6: 2 3
7: 5
It will never even print the same kind. Like once it prints 2+3, it will not print 3+2.
And my professor said once it found the sum is 5, it will just print. It will not store
the value 1+1+1+1+1. so after every loop, the stack will have a new number in it. Can some one figure out the logic. Thanks
Steve