1351. Count Negative Numbers in a Sorted Matrix

Обновлено: 2024-03-12
1 мин
[]

Содержание

LeetCode problem 1351

class Solution:
    def countNegatives(self, grid: List[List[int]]) -> int:
        return sum(bisect_left(row[::-1], 0) for row in grid)