Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jessemao/data-structure

This package groups basic data structures in Javascript ES6.
https://github.com/jessemao/data-structure

avl-tree binary-search-tree circular-linked-list data-structures doubly-linked-list es6 graph hashtable javascript linked-list map priority-queue queue set stack

Last synced: 29 days ago
JSON representation

This package groups basic data structures in Javascript ES6.

Awesome Lists containing this project

README

        

# Data Structure for Javascript ES6

This package groups basic data structures in Javascript ES6. It includes:

* Stack
* Queue
* Priority Queue
* Linked List
* Doubly Linked List
* Circular Linked List
* Set
* Map/Dictionary
* Hash Table
* Binary Search Tree
* AVL Tree
* Graph

They are all well tested and ready to use.

# How to use
Clone this repo and then follow the step:
```
git clone https://github.com/jessemao/data-structure.git
cd data-structure
npm install
```
Then you can grab the source file directly from `src` folder.

# How to test
If you add your own methods to the **data structure** you want to use, you might want to write a test case for your functionality as well.

If there's a file `[data-structure-name]-test.js` already exists in `test` folder, you can open it and write test cases in that file; otherwise, it's easy to create a new file named `[data-structure-name/methods-name]-test.js` in `test` folder.

When you are ready for testing, just run
```
npm run test
```

# License
MIT