diff --git a/notes/9. 用两个栈实现队列.md b/notes/9. 用两个栈实现队列.md index 51472537..bcace466 100644 --- a/notes/9. 用两个栈实现队列.md +++ b/notes/9. 用两个栈实现队列.md @@ -14,7 +14,7 @@ in 栈用来处理入栈(push)操作,out 栈用来处理出栈(pop)操 需要注意的是,只有 out 栈为空时才把 in 栈的元素全部倒进去;out 栈中还有元素时倒入,新元素会压在旧元素上面,先出栈,顺序就乱了。每个元素最多进出 in 栈、out 栈各一次,因此 deleteHead 的均摊时间复杂度为 O(1)。 -

+

```java class CQueue {