@ds-javascript/sort
v1.0.0
Published
Sorting algorithms in Javascript
Downloads
2
Maintainers
Readme
@ds-javascript/sort
Usage
const Sort = require('@ds-javascript/sort');
const sort = new Sort()
.bubble(array) It performs bubble sort on given array and returns sorted array.
sort.bubble([34,51,1,2,3,45,56,687])
.selection(array) It performs selection sort on given array and returns sorted array.
sort.selection([34,51,1,2,3,45,56,687])
.insertion(array) It performs insertion sort on given array and returns sorted array.
sort.insertion([34,51,1,2,3,45,56,687])
.merge(array) It performs merge sort on given array and returns sorted array.
sort.merge([34,51,1,2,3,45,56,687])
.quick(array) It performs quick sort on given array and returns sorted array.
sort.quick([34,51,1,2,3,45,56,687])