Add and remove at both ends of a double-ended queue stored in a circular array.
This interactive visualization needs JavaScript.