src/leetcode/stackandquene/StackusingQueues.java
public void push(int x) {
        queue.add(x);
        //遍历队列
        int size = queue.size();
        for (int i=0; i<size-1; i++) {
            queue.add(queue.poll()); //先出再加  poll()为空时，返回null
        }
    }
/** Push element x onto stack. */
Push element x onto stack.
Push element x onto stack .
public void push(int x) {
        queue.add(x);
        int size = queue.size();
        for (int i=0; i<size-1; i++) {
            queue.add(queue.poll()); 
        }
    }
public void push ( int x ) { queue . add ( x ) ; int size = queue . size ( ) ; for ( int i = 0 ; i < size - 1 ; i ++ ) { queue . add ( queue . poll ( ) ) ; } }
Push element x onto stack.
Push element x onto stack .
//遍历队列 //先出再加  poll()为空时，返回null