双栈实现队列的出队,入队功能
public class Solution{
Stack<Integer> stack1=new Stack<Integer>();*}*
Stack<Integer> stack2=new Stack<Integer>();
pubic void push(int node){
stack1.push();
}
public void poll(){
if(stack2.isEmpty()){
while(!stack1.isEmpty()){
stack2.push(stack1.poll());
}
}stack2.poll();}
}