From a6a505ae085500cd05fd539773d643f36e576367 Mon Sep 17 00:00:00 2001 From: onion Date: Mon, 4 May 2020 16:06:40 +0800 Subject: [PATCH] 1351 solved --- .../Article/1351-count-negative-numbers-in-a-sorted-matrix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/1351-count-negative-numbers-in-a-sorted-matrix/Article/1351-count-negative-numbers-in-a-sorted-matrix b/1351-count-negative-numbers-in-a-sorted-matrix/Article/1351-count-negative-numbers-in-a-sorted-matrix index 707220d..d7ad398 100644 --- a/1351-count-negative-numbers-in-a-sorted-matrix/Article/1351-count-negative-numbers-in-a-sorted-matrix +++ b/1351-count-negative-numbers-in-a-sorted-matrix/Article/1351-count-negative-numbers-in-a-sorted-matrix @@ -169,7 +169,8 @@ var countNegatives = function(arr) { ## 复杂度分析 -时间复杂度: O(m)。 +时间复杂度: O(mn)。 因为如果矩阵中所有的数都为正数,那么要遍历整个矩阵,所以时间复杂度是O(mn)。 + 空间复杂度:O(1)。