A double-ended queue, which provides O(1) indexed access, O(1) removals from the front and back, amortized O(1) insertions to the front and back, and O(N) insertions and removals anywhere else.
Open Source Agenda is not affiliated with "StephenCleary Deque" Project. README Source: StephenCleary/Deque