mirror of
https://github.com/youngyangyang04/leetcode-master.git
synced 2025-07-08 16:54:50 +08:00
update 0225.用队列实现栈:添加复杂度分析
This commit is contained in:
@ -111,6 +111,8 @@ public:
|
||||
}
|
||||
};
|
||||
```
|
||||
* 时间复杂度: push为O(n),其他为O(1)
|
||||
* 空间复杂度: O(n)
|
||||
|
||||
# 优化
|
||||
|
||||
@ -156,6 +158,9 @@ public:
|
||||
}
|
||||
};
|
||||
```
|
||||
* 时间复杂度: push为O(n),其他为O(1)
|
||||
* 空间复杂度: O(n)
|
||||
|
||||
|
||||
# 其他语言版本
|
||||
|
||||
|
Reference in New Issue
Block a user