User:Alf3xs

From Rosetta Code
Revision as of 03:10, 5 March 2019 by rosettacode>Alf3xs (Deque in C++)

Below is a C++ implementation of a Deque.

It uses a Circular Doubly Linked Unrolled Linked List of Circular Arrays as its underlying data structure to increase pushing and popping performance. Insertions and erasures, while are both constant time in circular arrays and linked lists, they are noticeably faster (at least without optimizations) in arrays.