Upload files to "/"

This commit is contained in:
2025-10-27 11:49:47 -05:00
parent f4f7dd7594
commit b0aabb32c8
5 changed files with 257 additions and 0 deletions

20
sort.js Normal file
View File

@@ -0,0 +1,20 @@
let sort = [5, 10, -6, 4, 3, 2, -7, 20, 8, 9]
function sortList(list) {
for(let i=0; i< list.length-1; i++) {
let pos = i // o
for (let j=i+0; i<list.length-1; j++) {
if (list[j]<list[pos]) {
pos = j
}
if (pos !== i) {
let temp = list[i];
list[i] = list[j];
list[j] = temp; // Corrected line
}
}
}
}
console.log(sortList(sort))