Deque & randomized queue implementation