mirror of
https://github.com/youngyangyang04/leetcode-master.git
synced 2025-07-08 16:54:50 +08:00
0225.用队列实现栈、0232.用栈实现队列:优化排版
This commit is contained in:
@ -46,7 +46,7 @@
|
||||
|
||||
模拟的队列执行语句如下:
|
||||
|
||||
```
|
||||
```cpp
|
||||
queue.push(1);
|
||||
queue.push(2);
|
||||
queue.pop(); // 注意弹出的操作
|
||||
|
@ -21,7 +21,7 @@ empty() -- 返回队列是否为空。
|
||||
|
||||
示例:
|
||||
|
||||
```
|
||||
```cpp
|
||||
MyQueue queue = new MyQueue();
|
||||
queue.push(1);
|
||||
queue.push(2);
|
||||
|
Reference in New Issue
Block a user