Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita6a505a

Browse files
committed
1351 solved
1 parent0697726 commita6a505a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎1351-count-negative-numbers-in-a-sorted-matrix/Article/1351-count-negative-numbers-in-a-sorted-matrix‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,8 @@ var countNegatives = function(arr) {
169169

170170
## 复杂度分析
171171

172-
时间复杂度: O(m)。
172+
时间复杂度: O(mn)。 因为如果矩阵中所有的数都为正数,那么要遍历整个矩阵,所以时间复杂度是O(mn)。
173+
173174

174175
空间复杂度:O(1)。
175176

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp