JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 8
  • Score
    100M100P100Q36277F
  • License ISC

Data Structures and Sorting Algorithms

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

  1. Stack
  2. Queue
  3. LinkedList
  4. Binary Search Tree
  5. Graph
  6. Tries
  7. Heap

It also supports sorting algorithms like

  1. Bubble Sort
  2. Selection Sort
  3. Insertation Sort
  4. Quick Sort
  5. Merge Sort
  6. 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);