class Solution { public: void push(int node) { stack1.push(node); } int pop() { while (stack1.size() != 1) { stack2.push(stack1.top()); stack1.pop(); } int ans = stack1.top(); stack1.pop(); while (stack2.size()) { ...