Given an array `arr`, return `true` if and only if it is a valid mountain array. An array is a valid mountain if it strictly increases to a peak (not at ends) and then strictly decreases.
arr = array of integers
true if arr is a valid mountain array, false otherwise
Example 1:
Input:
arr = [0,3,2,1]
Output:
true
Explanation:
Increases to 3 then decreases.
Example 2:
Input:
arr = [3,5,5]
Output:
false
Explanation:
Plateau at peak not strictly increasing.
Example 3:
Input:
arr = [0,1,2,3]
Output:
false
Explanation:
No decreasing part.