private:
stack<int> s;
stack<int> s1;
public:
void rev(stack<int>& s, stack<int>& s1) {
while (!s.empty()) {
s1.push(s.top());
s.pop();
}
}
MyQueue() {
}
void push(int x) { s.push(x); }
int pop() {
rev(s, s1);
int t = s1.top();
s1.pop();
rev(s1, s);
return t;
}
int peek() {
rev(s, s1);
int t= s1.top();
rev(s1, s);
return t;
}
bool empty() {
// if (s.size() == 0)
// return true;
// return false;
return s.empty();
}