From a3e6c4c69e0c380f5fdb9351f2f506f496c3249f Mon Sep 17 00:00:00 2001 From: marsonya Date: Fri, 25 Dec 2020 23:57:21 +0530 Subject: [PATCH] formatted implementation --- Sorts/BeadSort.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) 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')