Finding the product of each of the (n-1) subsets of a given array
- by guirgis
Hey everybody. Given an array of n integers, i need to find the product of each of the (n-1) subsets i.e:
ith subset = the product of all the elements except the ith element itself. e.g:
S = {1,0,3,2};
subset_product(1) = 0*3*2=0;
subset_product(2) = 1*3*2=6; etc.
So Any help?