How to find the sum of all subset of a array ?

Revision en1, by pvpcoder, 2016-04-02 19:11:10

Suppose if a I have a array A={2,3,5}
Subsets of array={2},{3},{5},{2,3},2,5},{3,5},{2,3,5}
and the sum of all subsets =2+3+5+2+3+5+3+5+2+3+5=40.
Is there any standard algorithm to find sum of all subsets of array ?

Tags subset sum

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English pvpcoder 2016-04-02 19:11:10 273 Initial revision (published)