Find Maximum Product of Adjacent Elements

Write a function using reduce() to find the maximum product of two adjacent elements in an array.
        
       Input:-3, 6, -2, -5, 7, 3
       Input Description: Input a string of numbers. Split it by "," and then convert it to array 
       Output: 21
       Output Description: Output the maximum product. 
       Constraints: 1 <= string length <= 10^6
       Explanation: 

Loading...