Skip to content
Javascript singly linked list
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
node_modules
test
.results.json
LICENSE
README.md
index.js
package-lock.json
package.json

README.md

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.
You can’t perform that action at this time.