Merge pull request #87 from PatOnTheBack/patch-1

Added Semicolon to Avoid Auto Semicolon Insertion
This commit is contained in:
Mohit Sharma
2019-06-27 11:28:14 +05:30
committed by GitHub

View File

@ -42,7 +42,7 @@ function bucketSort(list, size){
// bucket fill
for(let iBucket = 0; iBucket < list.length; iBucket++){
let key = Math.floor((list[iBucket] - min) / size);
buckets[key].push(list[iBucket])
buckets[key].push(list[iBucket]);
}
let sorted = [];
// now sort every bucket and merge it to the sorted list
@ -59,4 +59,4 @@ let arrOrignal = [5, 6, 7, 8, 1, 2, 12, 14];
console.log(arrOrignal);
arrSorted = bucketSort(arrOrignal);
//Array after sort
console.log(arrSorted);
console.log(arrSorted);