Represents a doubly linked list.
Creates an instance of DoubleLinkedList.
Optional
Optional initial data for the doubly linked list.
The head node of the doubly linked list.
The tail node of the doubly linked list.
Clears the doubly linked list by setting the head and tail nodes to undefined. TimeComplexity = O(1)
Returns the data of the first node in the doubly linked list. TimeComplexity = O(1)
The data of the first node.
Initializes the doubly linked list with nodes created from the elements of the specified array. TimeComplexity = O(n)
An array containing the data for the nodes.
Returns the data of the last node in the doubly linked list. TimeComplexity = O(1)
The data of the last node.
Removes and returns the data of the last node in the doubly linked list. TimeComplexity = O(1)
Inserts a new node with the specified data at the end of the doubly linked list. TimeComplexity = O(1)
The data for the new node.
Removes and returns the data of the first node in the doubly linked list. TimeComplexity = O(1)
Get size of the linkedList. TimeComplexity = O(n)
Converts the doubly linked list to an array. TimeComplexity = O(n)
An array containing the data of all the nodes.
Inserts a new node with the specified data at the beginning of the doubly linked list. TimeComplexity = O(1)
Generated using TypeDoc
Represents a doubly linked list.