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

Правка en1, от 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 ?

Теги subset sum

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский pvpcoder 2016-04-02 19:11:10 273 Initial revision (published)