Step 2-Swap smallest value with the first element of the list. Comment document.getElementById("comment").setAttribute( "id", "ad3dfc405d84670d06c6e57b610b23cf" );document.getElementById("b59d583d94").setAttribute( "id", "comment" ); Subscribe to our mailing list and get interesting stuff and updates to your email inbox. I have another question ( I really want to understand this program 😀 ) why is n-1 used instead of n in for(i=0;i