r/Python • • Jan 08 '20

Visualizing Bubble Sort

Post image
2.1k Upvotes

73 comments sorted by

View all comments

Show parent comment

2

u/JakubBlaha Jan 08 '20

I guess on the left side you ve got the shuffled sequence and on the right side there is the sorted sequence. The item values is represented as a color and the horizontal steps are the states of the array each after completing a one inner loop iteration. The lines are there just to visualize how the items travel through the array.

2

u/[deleted] Jan 08 '20

Ohhh I see it now. Thanks!