<doocs>1299.Replace Elements with Greatest Element on Right Side_1.py
def replaceElements( arr: List[int]) -> List[int]:
    m = -1
    for i in range(len(arr) - 1, -1, -1):
        t = arr[i]
        arr[i] = m
        m = max(m, t)
    return arr
def sample_funcname ( var_0 : List [ int ] ) -> List [ int ] :
    var_4 = - 1
    for var_7 in range ( len ( var_0 ) - 1 , - 1 , - 1 ) :
        var_8 = var_0 [ var_7 ]
        var_0 [ var_7 ] = var_4
        var_4 = max ( var_4 , var_8 )
    return var_0
