Package Exports
- ds.algo
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ds.algo) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
This a library to use all data stuctures and sorting algorithms
Data structures supported are
- Stack
- Queue
- LinkedList
- Binary Search Tree
- Graph
- Tries
- Heap
It also supports sorting algorithms like
- Bubble Sort
- Selection Sort
- Insertation Sort
- Quick Sort
- Merge Sort
- Heap Sort
To use this library
var $d = require('ds');
To get LinkedList object var ll = $d(':ll'); or $d.linkedlist();
To get Stack object var st = $d(':st'); or $d.stack();
To get Queue object var qu = $d(':qu'); or $d.queue();
To get BinarySearchTree object var bst = $d(':bst'); or $d.binarySearchTree();
To get Graph object var graph = $d(':grp'); or $d.graph();
To get Sorter object var sorter = $d(':sorter'); or $d.sorter();
sorter.selectionSort(array, comparator); sorter.bubbleSort(array, comparator); sorter.insertationSort(array, comparator); sorter.quickSort(array, comparator); sorter.mergeSort(array, comparator); sorter.heapSort(array, comparator);