Skip to content

Commit

Permalink
feat: 增加复杂度分析
Browse files Browse the repository at this point in the history
  • Loading branch information
azl397985856 authored Mar 13, 2020
1 parent 1de9738 commit 3bd582d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions problems/169.majority-element.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,11 @@ class Solution:
count -= 1
return majority
```

**复杂度分析**
- 时间复杂度:$O(N)$,其中N为数组长度
- 空间复杂度:$O(1)$

欢迎关注我的公众号《脑洞前端》获取更多更新鲜的LeetCode题解

![](https://pic.leetcode-cn.com/89ef69abbf02a2957838499a96ce3fbb26830aae52e3ab90392e328c2670cddc-file_1581478989502)

0 comments on commit 3bd582d

Please sign in to comment.