Stay organized with collections Save and categorize content based on your preferences.

C++ Reference: class DenseDoublyLinkedList

Note: This documentation is automatically generated.

Specialized doubly-linked list that initially holds [0..n-1] in an arbitrary (user-specified) and fixed order. It then supports O(1) removal and access to the next and previous element of a given (non-removed) element.

It is very fast and compact: it uses exactly 8*n bytes of memory.

Return type: explicit

Arguments: const T& sorted_elements


Return type: int

Arguments: int i

Next() (resp. Prev()) must be called on elements that haven't yet been removed. They will return -1 if called on the last (resp. first) element.


Return type: int

Arguments: int i


Return type: void

Arguments: int i

You must not call Remove() twice with the same element.


Return type: int