find all combinations of elements for the given number N (sum upto N)
- by webjockey
int array [] = {1,2,3,4,5,6,7,8,9}
N = 10
1,2,3,4 = 10
2,3,5 = 10
3,7 = 10
1,4,5 = 10
1,3,6 = 10
8,2 = 10
9,1 = 10
4,6 = 10
5,2,3 = 10
...
the function should return all combinations, the array may be unsorted