implemented RandomizedQueue