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}>
Each element appears the same number of times, which happens to be 2n-1 where n is number of elements. So the answer is: count sum of elements in the set and multiply it by 2n-1