UNPKG

algolibrary

Version:
16 lines (10 loc) 261 B
var bubbleSort = require('./bubbleSort'); function sort(arr, compareFn){ // Based on array length, we will select the sorting algorithm. let len = arr.length; bubbleSort.sort(arr, compareFn); return arr; } module.exports = { sort }