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