Arrays: Sort ascending
Task: Sort this array in ascending order
What you are watching
Sorting puts the values in ascending order by repeatedly finding the smallest one left and moving it to the front of what is unsorted. Each pass scans the remaining values, remembers where the smallest sat, and swaps it into place once. The green region on the left is finished and never has to be looked at again.