for j = n − 1 to 1 step − 1 do
does this means for all j in [1 .. n-1] or [2 .. n-1] ?
for j = n − 1 to 1 step − 1 do
does this means for all j in [1 .. n-1] or [2 .. n-1] ?
If n=5 then the for loop is executed 4 times with J equal to 4 then 3, then 2, and finally 1 in that order