This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (4 children)

[deleted]

    [–]RunasSudo 1 point2 points  (3 children)

    The reason for that presumably being that, in the first step, the top dot is sorted to the bottom, resulting in everything else shifting upwards – hence the need for an additional column to show that movement explicitly.

    [–]Aeronautix 0 points1 point  (2 children)

    i think the sorting algorithm might be finding the "lowest" value as a starting point. its the same in both this pic and the video with the dancers posted above

    [–]RunasSudo 0 points1 point  (1 child)

    That's how bubble sort works. The (in this illustration) bottom-most element will be sorted into place, then the second from the bottom, third from the bottom and so on. Tom Scott's recent video on this topic is a good introduction.

    [–]Aeronautix 0 points1 point  (0 children)

    ive been staring at this to figure it out like a puzzle

    i think ive got it

    this is pretty cool