using System.Collections.Generic; class Solution { Stack<int> sta1 = new Stack<int>(); Stack<int> sta2 = new Stack<int>(); int num2 = 0; public void push(int node) { sta1.Push(node); } public int pop() { if(num2 == 0){ for(int i = sta1.Count; i > 0; i--){ sta2.Push(sta1.Pop()); num2++; } } num2--; return sta2.Pop(); } }