mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-06 01:18:23 +08:00
Add doctest to BucketSort.js
This commit is contained in:
@ -55,6 +55,8 @@ function bucketSort (list, size) {
|
|||||||
|
|
||||||
// Testing
|
// Testing
|
||||||
const arrOrignal = [5, 6, 7, 8, 1, 2, 12, 14]
|
const arrOrignal = [5, 6, 7, 8, 1, 2, 12, 14]
|
||||||
|
// > bucketSort(arrOrignal)
|
||||||
|
// [1, 2, 5, 6, 7, 8, 12, 14]
|
||||||
// Array before Sort
|
// Array before Sort
|
||||||
console.log(arrOrignal)
|
console.log(arrOrignal)
|
||||||
const arrSorted = bucketSort(arrOrignal)
|
const arrSorted = bucketSort(arrOrignal)
|
||||||
|
Reference in New Issue
Block a user