Given an integer array arr, return the length of the longest subarray that forms a mountain. A mountain subarray has strictly increasing then strictly decreasing elements, with at least 3 elements. If no mountain exists, return 0.
Input: Integer array arr.
Output: Integer — length of longest mountain subarray, or 0.
Input: [2,1,4,7,3,2,5]
Output: 5
Explanation: [1,4,7,3,2] has length 5 and is a mountain.Input: [2,2,2]
Output: 0
Explanation: No mountain — no strictly increasing then decreasing.Input: [0,1,0]
Output: 3
Explanation: [0,1,0] is the whole array, a mountain of length 3.1<=arr.length<=10^40<=arr[i]<=10^4