栈和队列
1. 用两个栈实现队列
原题链接
补充:copy(a,b) 把a赋值给b class MyQueue {
public:/** Initialize your data structure here. */stack<int> stk, cache;MyQueue() {}/** Push element x to the back of queue. */void push(int x) {stk.push(x)…
点击vscode插件 --> 点击3个点 --> 选择从VSIX安装 点击更新报 Cannot update while running on a read-only volume. The application is on a read-only volume. Please move the application and try again. If you’re on macOS Sierra or later, you’ll need to m…