(soon to be) The most comprehensive collection of common data structures and algorithms (with explanations!) implemented in node.js
The key for each module is written as key
.
- signifies that a module is incomplete; feel free to implement it!
- Bubble Sort
1
- Selection Sort
2
- Factorial
3
- Combinations
4
- Permutations
5
- Linked List
1
- Binary Tree
2
- Clone the project repository
cd
into the project directory- Run
node index.js
to run project - Use console as input
- Install
algorithmsdotjs
asnpm install --save algorithmsdotjs
- Include the project with
algorithmsdotjs = require('algorithmsdotjs')
- Use exports of index.js (example)
sorted_array = algorithmsdotjs.Bubble.sort(array)
The example_data
module quickly creates arrays and single integers of randomized data (with specifications).
- Include
example_data
usingexample = require('./path/to/modules/example_data.js')
- Retrieve data using
let data = example.array(size_of_array, maximum_value_of_elements)
To return a single integer: example.integer(maximum_value)
If you have any additions/improvements/suggestions feel free to open a pull request or fork this repository!
MIT Licensed