摘要: 栈和队列 题目详情 请你仅使用两个栈实现先入先出队列。队列应当支持一般队列支持的所有操作(push、pop、peek、empty): 实现 MyQueue 类: void push(int x) 将元素 x 推到队列的末尾 int pop() 从队列的开头移除并返回元素 int peek() 返回队 阅读全文
posted @ 2022-04-25 10:53 ggaoda 阅读(1) 评论(0) 推荐(0) 编辑