src/main/java/com/leetcode/design/easy/ImplementStackUsingQueues_225.java
public void push(int x) {
      int size = queue.size();
      queue.add(x);
      while (size-- > 0) {
        queue.add(queue.poll());
      }
    }
/** Push element x onto stack. */
Push element x onto stack.
Push element x onto stack .
public void push(int x) {
      int size = queue.size();
      queue.add(x);
      while (size-- > 0) {
        queue.add(queue.poll());
      }
    }
public void push ( int x ) { int size = queue . size ( ) ; queue . add ( x ) ; while ( size -- > 0 ) { queue . add ( queue . poll ( ) ) ; } }
Push element x onto stack.
Push element x onto stack .