New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

namastey-circular-linked-list

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

namastey-circular-linked-list

A package implementing Circular Linked List data structure with various important methods.

  • 1.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-50%
Maintainers
0
Weekly downloads
 
Created
Source

namastey-circular-linked-list

Brief Description

namastey-circular-linked-list is a JavaScript package that provides an implementation of the Circular Linked List data structure. It includes various methods for manipulating and interacting with the list.

Features

  • append(value): Adds a new node with the specified value to the end of the list.
  • insertAt(value, position): Inserts a new node with the specified value at the given position.
  • remove(value): Removes the first node with the specified value from the list.
  • find(value): Finds and returns the node with the specified value.
  • printList(): Prints the entire list to the console.
  • getSize(): Returns the number of nodes in the list.

Installation

To install the package globally, run:

npm install -g namastey-circular-linked-list

Examples

const CircularLinkedList = require('namastey-circular-linked-list');

const list = new CircularLinkedList();
list.append(10);
list.append(20);
list.append(30);
list.insertAt(15, 1);
list.printList(); // Output: 10 -> 15 -> 20 -> 30 -> (head)

console.log('Size of list:', list.getSize()); // Output: Size of list: 4

list.remove(20);
list.printList(); // Output: 10 -> 15 -> 30 -> (head)

Keywords

FAQs

Package last updated on 27 Aug 2024

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc