@banshi/linked-list
v0.0.1
Published
Utility Linked list
Downloads
1
Readme
-banshi-linked-list
npm install @banshi/linked-list
import LinkedList, { Node } from "@banshi/linked-list";
let ls = new LinkedList<number>;
- add(4);
- add(2);
let third = new Node(3);
- add(third);
- add(5);
- add(new Node(6));
- printList();
Methods
List of Methods
add(Value) - Value or Node instance; let third = new Node(3);
add(third);
printList() - Pring List
breakCircular() - Break cercular list
isCircularList() - Check linked list is circular or not
prepend(Value/Node) - Prepend
insert(Value, index) -- Insert value at index
sort() - Sort list