Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wwwanlingxiao
LeetCodeAnimation
Commits
a6a505ae
Commit
a6a505ae
authored
May 04, 2020
by
onion
Browse files
1351 solved
parent
06977268
Changes
1
Show whitespace changes
Inline
Side-by-side
1351-count-negative-numbers-in-a-sorted-matrix/Article/1351-count-negative-numbers-in-a-sorted-matrix
View file @
a6a505ae
...
@@ -169,7 +169,8 @@ var countNegatives = function(arr) {
...
@@ -169,7 +169,8 @@ var countNegatives = function(arr) {
## 复杂度分析
## 复杂度分析
时间复杂度: O(m)。
时间复杂度: O(mn)。 因为如果矩阵中所有的数都为正数,那么要遍历整个矩阵,所以时间复杂度是O(mn)。
空间复杂度:O(1)。
空间复杂度:O(1)。
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment