兩個棧實現一個隊列

問題描述:如題,用兩個棧來實現一個隊列,完成隊列的Push和Pop操做。node public class Solution { Stack<Integer> stack1 = new Stack<Integer>(); Stack<Integer> stack2 = new Stack<Integer>(); public void push(int node) {
相關文章
相關標籤/搜索