If, array is 1 2 2 1, then 1+2 (index 0,1) and 2+1(index 2,3) is counted twice in the sub set sum array, but still the solution got accepted… how? Should all the elements should be distinct in input ?
If, array is 1 2 2 1, then 1+2 (index 0,1) and 2+1(index 2,3) is counted twice in the sub set sum array, but still the solution got accepted… how? Should all the elements should be distinct in input ?