Search/Sorts algoruthms : remove live code & console.log, leave examples as comments.

This commit is contained in:
Eric Lavault
2021-10-11 12:29:03 +02:00
parent 8a7be96c9d
commit 74f296578a
22 changed files with 121 additions and 197 deletions

View File

@ -3,7 +3,7 @@
* more information: https://en.wikipedia.org/wiki/Shellsort
*
*/
function shellSort (items) {
export function shellSort (items) {
let interval = 1
while (interval < items.length / 3) {
@ -25,12 +25,3 @@ function shellSort (items) {
}
return items
}
// Implementation of shellSort
const ar = [5, 6, 7, 8, 1, 2, 12, 14]
// Array before Sort
console.log(ar)
shellSort(ar)
// Array after sort
console.log(ar)