DoublyLinkedList

doubly linked list

new virtuosity.structures.DoublyLinkedList();


Parameter Type Description

Classes

Methods


Classes

Node

DoublyLinkedList node



Methods

push

add a node to the doubly linked list

virtuosity.structures.DoublyLinkedList.push(data);


Parameter Type Description
data ANY data for the new node

delete

delete a node

virtuosity.structures.DoublyLinkedList.delete(i);


Parameter Type Description
i Int index of the node

get

get a node

virtuosity.structures.DoublyLinkedList.get(i);


Parameter Type Description
i Int index of the node

peek

get the head of the doubly linked list

virtuosity.structures.DoublyLinkedList.peek();

size

get the size of the doubly linked list

virtuosity.structures.DoublyLinkedList.size();

print

output an array representation of the doubly linked list

virtuosity.structures.DoublyLinkedList.print();