Socket
Socket
Sign inDemoInstall

@banshi/linked-list

Package Overview
Dependencies
3
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @banshi/linked-list

Utility Linked list


Version published
Weekly downloads
2
decreased by-33.33%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

-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

Keywords

FAQs

Last updated on 23 Mar 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc