AlgoViz
← Back to the lesson
🧩 Puzzle · Apply Bubble Sort

Bubble it up

Walk one pass of bubble sort by hand. Look at each adjacent pair (amber) and decide: if the left card is bigger, Swap; otherwise Leave it. Keep going and watch the biggest value rise — 'bubble' — all the way to the back. That's exactly what one pass does.

Comparison 1 of 5 · is the left bigger?
514283
Compare the two amber cards. Is the left one bigger? Then it has to swap right.
Amber = the pair you're comparing. Swap only when the left card is bigger than the right.no misses