Deques and Randomized Queues - Nanodesy/algs4 GitHub Wiki

Deques and Randomized Queues

Dequeue

A fairly simple task, the essence of which is to implement a doubly linked list and develop its methods.

Randomized Queue

The essence of this task is to implement the queue through an array, so that we can easily and easily get random elements.

Client

It is especially difficult to immediately create a data structure of the desired size. That will allow you not to waste time on resizing.