algo-util
v0.0.4
Published
nodejs module having pre-defined util functions for data structures and algorithm.
Downloads
1
Maintainers
Readme
Algo-Util
Library having data structures and algorithms as utility functions for node.js.
Click here for the link.
Note: This module is still under development and more util functions will be added.
Philosophy
Algo-util philosophy is to provide complex data structures and algorithms as utility to developers.
This will save their precious time, and let them focus on core development.
This will also help new developers who just entered the industry.
cheers... ;)
Installation
This is a Node.js module available through the npm registry.
Before installing, download and install Node.js. Node.js 8.x or higher is required.
Installation can be done using the
npm install
command:
$ npm install algo-util --save
How To Use
const algoUtil = require('algo-util');
let arr = [8, 4, 9, 5, 2];
let sortedList = algoUtil.bubbleSort(arr);
console.log(sortedList);
Examples
const algoUtil = require('algo-util');
let arr = [8, 4, 9, 5, 2];
Performing Linear Searching.
let index = algoUtil.linearSearch(arr, 9);
console.log(index); // 2 (-1 if not found)
Performing Binary Searching.
let index = algoUtil.binarySearch(arr, 5);
console.log(index); // 3 (-1 if not found)
Performing Bubble Sorting.
let sortedList = algoUtil.bubbleSort(arr);
console.log(sortedList); // [2, 4, 5, 8, 9]
Performing Selection Sorting.
let sortedList = algoUtil.selectionSort(arr);
console.log(sortedList); // [2, 4, 5, 8, 9]
Features
- Implemented in native javascript.
- No dependencies or third-party library used.
- Major data structures included.
- Searching algorithms.
- Sorting algorithms.
- More yet to come... :)
Authors
The original author and current maintainer of Algo-util is Rishabh Singh Sengar.