singly-linked-lists
v1.0.1
Published
This is a JavaScript implementation of linked lists ---
Readme
A quick overview of this project
This is a JavaScript implementation of linked lists
Classes
- LinkedList class serves as a representation of the whole list
- Node class serves as a node of a list
LinkedList methods
append(value)adds a new node containing value to the end of the listprepend(value)adds a new node containing value to the start of the listsizereturns the total number of nodes in the listheadreturns the first node in the listtailreturns the last node in the listat(index)returns the node at the given indexpopremoves the last element from the listcontains(value)returns true if the passed in value is in the list and otherwise returns false.find(value)returns the index of the node containing value, or null if not found.toStringrepresents LinkedList objects as strings. The format is: ( value ) -> ( value ) -> ( value ) -> null
