注册
登录
nodejs
>>
my-linked-list-js
>>
返回
项目作者:
Rygel-XVI
项目描述 :
Javascript singly linked list
高级语言:
JavaScript
项目主页:
项目地址:
git://github.com/Rygel-XVI/my-linked-list-js.git
创建时间:
2019-03-20T00:12:04Z
项目社区:
https://github.com/Rygel-XVI/my-linked-list-js
开源协议:
MIT License
下载
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.