<doocs>0240.Search a 2D Matrix II_1.py
def searchMatrix( matrix: List[List[int]], target: int) -> bool:
    m, n = len(matrix), len(matrix[0])
    i, j = m - 1, 0
    while i >= 0 and j < n:
        if matrix[i][j] == target:
            return True
        if matrix[i][j] > target:
            i -= 1
        else:
            j += 1
    return False
def sample_funcname ( var_0 : List [ List [ int ] ] , var_3 : int ) -> bool :
    var_6 , var_8 = len ( var_0 ) , len ( var_0 [ 0 ] )
    var_10 , var_11 = var_6 - 1 , 0
    while var_10 >= 0 and var_11 < var_8 :
        if var_0 [ var_10 ] [ var_11 ] == var_3 :
            return True
        if var_0 [ var_10 ] [ var_11 ] > var_3 :
            var_10 -= 1
        else :
            var_11 += 1
    return False
