Tag:Performance value

  • Weekly game 180 of leetcode – Python solution

    Time:2021-9-17

    5356. Lucky numbers in matrices class Solution: def luckyNumbers (self, matrix: List[List[int]]) -> List[int]: rmin = [min(x) for x in matrix] cmax = [] n = len(matrix) m = len(matrix[0]) for i in range(m): maxv = matrix[0][i] for j in range(1, n): maxv = max(maxv, matrix[j][i]) cmax.append(maxv) ans = [] for i in range(n): for […]