Suggest an algorithm for finding the sum of all subsets of a set.
For example, if k=3 and the subsets are {1},{2},{3},{1,2},{1,3},{2,3},{1,2,3}>
k=3
{1},{2},{3},{1,2},{1,3},{2,3},{1,2,3}>
For an input {x1, …, xn}, return 2n-1 (x1 + … + xn), since each term appears in that many sums.