Randomized Queues and Deques