class MyStack {
public:
// 用两个队模拟栈
queue<int> que1;
queue<int> que2; // 辅助队列,备份用
/** Initialize your data structure here. */
MyStack() {
}
/** Push element x onto stack. */
void push(int x)
class MyStack {
public:
// 用两个队模拟栈
queue<int> que1;
queue<int> que2; // 辅助队列,备份用
/** Initialize your data structure here. */
MyStack() {
}
/** Push element x onto stack. */
void push(int x)