LinkedList

linked list

new virtuosity.structures.LinkedList();


Parameter Type Description

Classes

Methods


Classes

Node

LinkedList node



Methods

push

add a node

virtuosity.structures.LinkedList.push(data);


Parameter Type Description
data ANY data for the new node

delete

delete a node

virtuosity.structures.LinkedList.delete(i);


Parameter Type Description
i Int index of the node

get

get a node

virtuosity.structures.LinkedList.get(i);


Parameter Type Description
i Int index of the node

peek

get the head of the linked list

virtuosity.structures.LinkedList.peek();

size

get the size of the linked list

virtuosity.structures.LinkedList.size();

print

output an array representation of the linked list

virtuosity.structures.LinkedList.print();