From 2de83153bc546f59c6abafe50c545fa175cc04a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C5=9F=C4=B1nsu=20Ar=C4=B1c=C4=B1?= Date: Wed, 2 Feb 2022 19:27:41 +0300 Subject: [PATCH] 1351 --- E_1351_CountNegativeNumbersinaSortedMatrix.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 E_1351_CountNegativeNumbersinaSortedMatrix.py diff --git a/E_1351_CountNegativeNumbersinaSortedMatrix.py b/E_1351_CountNegativeNumbersinaSortedMatrix.py new file mode 100644 index 0000000..1bd03af --- /dev/null +++ b/E_1351_CountNegativeNumbersinaSortedMatrix.py @@ -0,0 +1,17 @@ +class Solution: + def countNegatives(self, grid: List[List[int]]) -> int: + def binary_search(row): + start, end = 0, len(row) + while start