Applying Kadane algorithm to get max product subarray seems tricky. While I am able to get the max product, I am not really getting the correct range of the max product subarray.
http://www.geeksforgeeks.org/maximum-product-subarray/ explains the way to get the max product but I dont get how we can get the range of the subarray.
Can someone help me understand the range issue? This is a standard interview question and I want to make sure I understand the logic for the product case instead of just saying that the max sum subarray can be modified to answer max product subarray case.
thanks!!