Question
Given a integers m and n, generate all combination within 1 to n that would give the sum m. For example, for m=5 and n=5, the combinations are {5}, {4+1}, {3+2}.
Solution
This is a knapsack problem.
#knapsack that store the found combination
knapsack = array