<doocs>1762.Buildings With an Ocean View_1.py
def findBuildings( heights: List[int]) -> List[int]:
    mx = 0
    ans = []
    for i in range(len(heights) - 1, -1, -1):
        v = heights[i]
        if mx < v:
            ans.append(i)
            mx = v
    return ans[::-1]
def sample_funcname ( var_0 : List [ int ] ) -> List [ int ] :
    var_4 = 0
    var_5 = [ ]
    for var_9 in range ( len ( var_0 ) - 1 , - 1 , - 1 ) :
        var_10 = var_0 [ var_9 ]
        if var_4 < var_10 :
            var_5.append ( var_9 )
            var_4 = var_10
    return var_5 [ : : - 1 ]
