public static void stackToQueue(Stack<Integer> s, Queue<Integer> q) { while (!s.isEmpty()) { int n = s.pop(); q.add(n);. } } Sum of a Queue.
確定! 回上一頁