Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/jessemao/data-structure
- Owner: jessemao
- Created: 2017-03-10T02:10:56.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-14T06:55:45.000Z (almost 8 years ago)
- Last Synced: 2024-11-16T10:13:52.824Z (3 months ago)
- Topics: 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
- Language: JavaScript
- Homepage:
- Size: 23.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
* GraphThey 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