Represents a linked list.
The head node of the linked list.
The tail node of the linked list.
Clears the linked list by setting the head node to undefined. TimeComplexity = O(1)
Returns the data of the first node in the linked list. TimeComplexity = O(1)
The data of the first node.
Initializes the 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 linked list. TimeComplexity = O(1)
The data of the last node.
Removes and returns the data of the last node in the linked list. TimeComplexity = O(n)
Inserts a new node with the specified data at the end of the linked list. TimeComplexity = O(1)
The data for the new node.
Removes and returns the data of the first node in the linked list. TimeComplexity = O(1)
Get size of the linkedList. TimeComplexity = O(n)
Converts the 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 linked list. TimeComplexity = O(1)
Generated using TypeDoc
Represents a linked list.