0 out of 464 challenges solved

Maximum Product Subarray

Write a function `max_subarray_product` that takes a list of integers and returns the maximum product of any contiguous subarray within the list.

#### Example
```python [main.nopy]
max_subarray_product([1, -2, -3, 0, 7, -8, -2])
# Output: 112

max_subarray_product([6, -3, -10, 0, 2])
# Output: 180

max_subarray_product([-2, -40, 0, -2, -3])
# Output: 80
```

#### Constraints
- The input list will have at least one integer.
- The integers in the list can be positive, negative, or zero.
def max_subarray_product(arr):
    """
    Find the maximum product of any contiguous subarray in the given array.

    Args:
        arr (list): A list of integers.

    Returns:
        int: The maximum product of any contiguous subarray.
    """
    # Placeholder for the solution
    pass