The problem is to enumerate all the ways in which a given number can be written as sum of two or more positive integers. For example 5 can be written as [4, 1], [3, 1, 1], [2, 1, 1, 1], [1, 1, 1, 1, 1], [2, 2, 1] and [3, 2].
I used a recursion to solve the problem. The recursion works like this. Write 5 as 4 + 1. Recurse for 4. 5 can also be ...
Continue Reading ?MAR
