class MyQueue {
private:
queue[HTML_REMOVED] q;
public:
/* Initialize your data structure here. /
MyQueue() {}
/** 将元素压入栈顶 */
void push(int x) {
int n = q.size();
q.push(x);
while(n--){
q.push(q.front());
q.pop();
}
}
/** 移除并返回栈顶元素 */
int pop() {
int res = q1.front();
q1.pop();
return res;
}
/** 返回栈顶元素 */
int top() {
int res = q1.front();
return res;
}
/** 返回栈是否为空 */
bool empty() {
return q1.empty;
}
};
/*
* Your MyQueue object will be instantiated and called as such:
* MyQueue obj = MyQueue();
* obj.push(x);
* int param_2 = obj.pop();
* int param_3 = obj.peek();
* bool param_4 = obj.empty();
/