Given a sum s, and an integer n as an input, find all possible combinations
that sum up to s. For example:
If s = 5, and n = 2, then output should be
0+5, 1+4, 2+3, 3+2, 4+1, 5+0
If s = 5, and n = 3, then output should be
0+0+5, 0+1+4, 0+2+3, 0+3+2, 0+4+1, 0+5+0, 1+0+4, 1+1+3, 1+2+2...2+0+3,
2+1+2...5+0+0
and so on for n = 4, 5...

-- 
thanks
--mac

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to