Join Regular Classroom : Visit ClassroomTech

Coding Questions | Pack of Chocolates | Codewindow.in

Ashwin bought a pack of chocolates wherein each of the chocolates a number is printed inside the chocolate cover. He wants to find the maximum product when multiplying those numbers. Give an array A[] that contains both positive and negative integers. Write a program to print the maximum product in a continuous subarray.

Example:
Input:
5
6 -3 -10 0 2

Output:
180

Explanation:
The maximum product continuous subarray for this array is {6*-3*-10}=180

Solution:

Coming....
You Missed
Also Checkout