Sorting algorithms/Insertion sort: Difference between revisions

m
Minor edit...
m (Added a comment)
m (Minor edit...)
Line 249:
set output=
for /l %%x in (0,1,%range%) do (if !last! equ %%x (
set "output=!output!^>< !num%%x!"
) else (
set "output=!output! !num%%x!"
Line 291:
Sorting:
 
>> -1 0>< 5 2 7 4 3 6 -1 7 2 1 -2 8
>> -1 0 5>< 2 7 4 3 6 -1 7 2 1 -2 8
>> -1 0 2 5>< 7 4 3 6 -1 7 2 1 -2 8
>> -1 0 2 5 7>< 4 3 6 -1 7 2 1 -2 8
>> -1 0 2 4 5 7>< 3 6 -1 7 2 1 -2 8
>> -1 0 2 3 4 5 7>< 6 -1 7 2 1 -2 8
>> -1 0 2 3 4 5 6 7>< -1 7 2 1 -2 8
>> -1 -1 0 2 3 4 5 6 7>< 7 2 1 -2 8
>> -1 -1 0 2 3 4 5 6 7 7>< 2 1 -2 8
>> -1 -1 0 2 2 3 4 5 6 7 7>< 1 -2 8
>> -1 -1 0 1 2 2 3 4 5 6 7 7>< -2 8
>> -2 -1 -1 0 1 2 2 3 4 5 6 7 7>< 8
>> -2 -1 -1 0 1 2 2 3 4 5 6 7 7 8
DONE!</pre>
535

edits