mirror of
https://github.com/youngyangyang04/leetcode-master.git
synced 2025-07-08 00:43:04 +08:00
更正复杂度分析中的笔误
This commit is contained in:
@ -110,7 +110,7 @@ public:
|
|||||||
```
|
```
|
||||||
|
|
||||||
* 时间复杂度:O(nlog n),因为有一个快排
|
* 时间复杂度:O(nlog n),因为有一个快排
|
||||||
* 空间复杂度:O(1),有一个快排,最差情况(倒序)时,需要n次递归调用。因此确实需要O(n)的栈空间
|
* 空间复杂度:O(n),有一个快排,最差情况(倒序)时,需要n次递归调用。因此确实需要O(n)的栈空间
|
||||||
|
|
||||||
可以看出代码并不复杂。
|
可以看出代码并不复杂。
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user