两个栈实现一个队列

问题描述:如题,用两个栈来实现一个队列,完成队列的Push和Pop操做。node public class Solution { Stack<Integer> stack1 = new Stack<Integer>(); Stack<Integer> stack2 = new Stack<Integer>(); public void push(int node) {
相关文章
相关标签/搜索