Concept Flow - Maximum Product Subarray
Start at index 0
Initialize max_prod, min_prod, result
For each element i in array
Calculate temp max and min products
Update max_prod and min_prod
Update result if max_prod > result
Move to next element
End of array?
No→Repeat loop
Yes
Return result
We move through the array, keeping track of the maximum and minimum products ending at each position, updating the overall maximum product found.
