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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-08-06 UTC."],[[["`DenseDoublyLinkedList` is a specialized doubly-linked list in C++ designed for efficient element removal and access to next/previous elements."],["It initializes with a user-defined order of elements \\[0..n-1\\] and maintains this order throughout its operations."],["This data structure boasts a compact memory footprint, using only 8\\*n bytes."],["Key functionalities include `Next()`, `Prev()`, and `Remove()` for navigating and manipulating the list, with `O(1)` time complexity for these operations."],["The list also provides a `Size()` method to retrieve the current number of elements."]]],["The `DenseDoublyLinkedList` class creates a specialized doubly-linked list containing elements \\[0..n-1\\] in a fixed order. It provides O(1) removal via `Remove(int i)` and access to adjacent elements using `Next(int i)` and `Prev(int i)`. `Next()` and `Prev()` returns -1 when called on the last/first elements, and they require that the element is not removed. The constructor `DenseDoublyLinkedList(const T& sorted_elements)` creates the list, and `Size()` gets its size. The list uses 8\\*n bytes of memory.\n"]]