<doocs>0941.Valid Mountain Array_1.py
def validMountainArray( arr: List[int]) -> bool:
    n = len(arr)
    if n < 3:
        return False
    l, r = 0, n - 1
    while l + 1 < n - 1 and arr[l] < arr[l + 1]:
        l += 1
    while r - 1 > 0 and arr[r] < arr[r - 1]:
        r -= 1
    return l == r
def sample_funcname ( var_0 : List [ int ] ) -> bool :
    var_5 = len ( var_0 )
    if var_5 < 3 :
        return False
    var_9 , var_11 = 0 , var_5 - 1
    while var_9 + 1 < var_5 - 1 and var_0 [ var_9 ] < var_0 [ var_9 + 1 ] :
        var_9 += 1
    while var_11 - 1 > 0 and var_0 [ var_11 ] < var_0 [ var_11 - 1 ] :
        var_11 -= 1
    return var_9 == var_11
