function insertionSort(ul){
for(var i =0; i< ul.length; i++){
for(var j = i-1; j<ul.length; j++){
if(ul[j] > ul[j+1]){
[ul[j],ul[j+1]] = [ul[j+1], ul[j]]
}
}
}
return ul
}
var ul = [5, 3, 1, 2, 4];
console.log(insertionSort(ul));
^Mon implantation est-elle considérée comme un type d'insertion, ou est-ce un tri des bulles?Ma mise en œuvre est-elle considérée comme un type d'insertion?