diff --git a/Sorts/BeadSort.js b/Sorts/BeadSort.js index 518e539d1..ed88ca705 100644 --- a/Sorts/BeadSort.js +++ b/Sorts/BeadSort.js @@ -69,5 +69,14 @@ function beadSort (sequence) { return sortedSequence } -// implementation -console.log(beadSort([5, 4, 3, 2, 1])) +/** +* Implementation of Cocktail Shaker Sort +*/ +const array = [5, 4, 3, 2, 1] +// Before Sort +console.log('\n- Before Sort | Implementation of Bead Sort -') +console.log(array) +// After Sort +console.log('- After Sort | Implementation of Bead Sort -') +console.log(beadSort(array)) +console.log('\n')