标签:not span param pre style python code find nbsp
def find_integer(matrix, num): """ :param matrix: [[]] :param num: int :return: bool """ if not matrix: return False rows, cols = len(matrix), len(matrix[0]) row, col = rows - 1, 0 while row >= 0 and col <= cols - 1: if matrix[row][col] == num: return True elif matrix[row][col] > num: row -= 1 else: col += 1 return False
标签:not span param pre style python code find nbsp
原文地址:https://www.cnblogs.com/xzm123/p/9847816.html