🧠 Sorting Algorithms Visualiser

Don't memorise the words — watch what the numbers actually do.
🫧 Bubble Sort
Compare neighbouring numbers. If they are in the wrong order, swap them. The larger number keeps moving towards the right.
Think: Compare → Swap → Move RIGHT → Repeat
Ready...
Click Next Step to start.

What should you see? 👀

Imagine the biggest number is trying to escape to the right side.

5 3 4 2

5 & 3 → swap
3 5 4 2

5 & 4 → swap
3 4 5 2

5 & 2 → swap
3 4 2 5 🏁

After one complete pass, the biggest unsorted number is guaranteed to be at the right.

🧠 The easiest way to remember them

🫧 Bubble Sort

Compare neighbours.

🔄 Swap if wrong.

📈 Big numbers move RIGHT.

One pass = travel across the list.

🃏 Insertion Sort

Left side is sorted.

🎯 Pick the next number.

⬅️ Move it LEFT until it fits.

One insertion = one new item added.