WAP to find the product of all subarrays of an array
Example 1:
Input: {2,5}
Output: 100
Subarrays are {2}, {5}, {2,5}
Product is 2*5*10=100
Example 2:
Input: {3,6,8}
Output: 8957952
Subsets are {3}, {6}, {8}, {3,6}, {6,8}, {3,8}, {3,6,8}
Product is 3*6*8*18*48*24*144 =8957952
Published By : Kopal Jaiswal