The “subset sum” problem asks the question
whether a list of integers contains a subset of integers that, when
summed, gives zero as answer. For instance, for the list
[1, 4, -3, -5, 7]
the answer is “yes,” as $1 + 4 - 5 = 0$. However,
for the list [1, 4, -3, 7]
the answer is “no,” as there is no subset
of integers that adds up to zero. Write a program that solves the
“subset sum” problem for a list of integers. If there is a solution,
print it; if not, report that there is no solution.
Hint: This problem is tackled best using recursion. If you skipped Chapter 10, you better skip this exercise too.