0.0.1 • Published 3 months ago

@banshi/linked-list v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

-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
0.0.1

3 months ago