Suppose I have an array {1, 2, 3, 4} and m = 3.
I need to find:
1*2*3 + 1*2*4 + 1*3*4 + 2*3*4
i.e Sum of multiplication of all combination of m element from an array of n elements.
One of the solution possible is to find all combination and then solving it but that would be O(nCm) solution. Is there any faster solution?