awesome-dsa
TypeScript icon, indicating that this package has built-in type declarations

0.0.7 • Public • Published

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
Structure Description
SinglyLinkedList A linked list that has nodes which only has a reference to the next node.
DoublyLinkedList Functionality 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.
Stack A more practical and useful implementation of a stack which grows as needed.
LimitedStack A 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

Package Sidebar

Install

npm i awesome-dsa

Weekly Downloads

1

Version

0.0.7

License

MIT

Unpacked Size

270 kB

Total Files

13

Last publish

Collaborators

  • nethren