Arrays101 Valid Mountain Array in GO
Given an array of integers arr, return true if and only if it is a valid mountain array. Recall that arr is a mountain array if and only if: arr.length >= 3 There exists some i with 0 arr[i + 1] > ... > arr[arr.length - 1] Constraints: 1 arr[i] { goingUp = false down++ } else { up++ } } else { if arr[i-1] < arr[..
Go/Leet Code
2022. 3. 4. 02:03