rewrote RandomizedQueue.java