Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

js-sorting-algo

kumar-gaurav-mishra11GPL-3.01.0.1

Sorting Algorithms in Javascript

DataStruture, sorting, algorithms, js-sorting-algorithms, js sorting, quickSort, bubbleSort, mergeSort, radixSort, insertionSort

readme

Sorting algorithms in javascript

Currently supported sorting algorithms :

  • quickSort
  • selectionSort
  • bubbleSort
  • mergeSort
  • radixSort
  • insertionSort

Installation & Usage :


npm install js-sorting-algo

 const sort = require('js-sorting-algo');
 sort.quickSort([23, 25, 10, 2, 200]); // [2, 10, 23, 25, 200];
 sort.bubbleSort([23, 25, 10, 2, 200]); // [2, 10, 23, 25, 200];
 sort.selectionSort([23, 25, 10, 2, 200]); // [2, 10, 23, 25, 200];
 sort.mergeSort([23, 25, 10, 2, 200]); // [2, 10, 23, 25, 200];
 sort.radixSort([23, 25, 10, 2, 200]); // [2, 10, 23, 25, 200];
 sort.insertionSort([23, 25, 10, 2, 200]); // [2, 10, 23, 25, 200];