Skip to content

Rygel-XVI/my-linked-list-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

my-linked-list-js

My personal implementation of a singly linked list in Javascript from scratch

Includes a test suite.

Functions

addToHead(data)

Adds a Node to the head. If no data is given it returns null

addToTail(data)

Adds a Node to the tail.

removeFromHead()

If there is a Node at the head it removes it.

remove(data)

Finds and removes the Node from the list if it exists.

find(data)

Finds and returns the Node that contains the data.

addAtIndex(data, index)

Adds a node at the specified index.

Releases

No releases published

Packages

No packages published