Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

awesome-dsa

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

awesome-dsa

A 0 dependency library which provides classic data structures and algorithms (written in typescript) targeting browser environments.

  • 0.0.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Awesome-DSA

What is Awesome DSA?

This is currently under development and lacks full features (more details below)

Awesome DSA provides classic Data Structures & Algorithms to use in any of your projects.
It currently provides,

  • Data Structures
StructureDescription
SinglyLinkedListA linked list that has nodes which only has a reference to the next node.
DoublyLinkedListFunctionality is the same for the most part (there are two more methods in this class) as SinglyLinkedList for the end users but implemented with nodes that has references to both next and previous node.
StackA more practical and useful implementation of a stack which grows as needed.
LimitedStackA classic implementation of Stack that is limited to the size it's given at the initialization.

Awesome DSA is released under the MIT license.You are free to use the source code in anyway you want.Also contributions are much appreciated as I'm just doing this in my free time for fun 😉.

Documentation

Visit the documentation here | Also you editor will give great suggestions because of extensive tsdoc comments.

Installation

Using npm:

npm i awesome-dsa

Using yarn:

yarn add awesome-dsa

Note: add --save if you are using npm < 5.0.0

Usage

In nodejs environment:

const dsa = require("awesome-dsa");
const list = new dsa.DoublyLinkedList();
//or
const { SinglyLinkedList } = require("awesome-dsa");
const list = new SinglyLinkedList();
list.insertAtEnd(10);

In ES modules (Typescript or Javascript):

import dsa from "awesome-dsa";
const q = new dsa.LinearQueue();
//or
import { SinglyLinkedList } from "awesome-dsa";
const list = new SinglyLinkedList();

Recommended to use importing single classes ({} syntax) to leverage tree shaking capabilities of bundling tools.It will reduce your bundle sizes greatly.

Bugs & Feature Requests

If you come across any bugs or have any feature requests, please open an issue or create a pull request. Visit here to open an issue.

Written By

Nethsara Sandeepa Elvitigala
Email: nethsarasandeepaelvitigala@gmail.com
Twitter | linkedin | Github | Facebook

Keywords

FAQs

Package last updated on 07 Jan 2022

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