Add doctest to BucketSort.js

This commit is contained in:
Christian Clauss
2020-05-13 01:27:55 +02:00
committed by GitHub
parent f59062ae1a
commit 050f56b190

View File

@ -55,6 +55,8 @@ function bucketSort (list, size) {
// Testing
const arrOrignal = [5, 6, 7, 8, 1, 2, 12, 14]
// > bucketSort(arrOrignal)
// [1, 2, 5, 6, 7, 8, 12, 14]
// Array before Sort
console.log(arrOrignal)
const arrSorted = bucketSort(arrOrignal)