☰
←
Back
Learnvas
Lesson
How bubble sort works
Programming
↗
Share
1/17
Prev step
Continue →
Light
Dark
Auto
Step 1 of 17
← → to move · space to autoplay
The idea
Walk through the list, comparing each pair of neighbours.
If a pair is in the wrong order, swap it.
After each pass, the biggest remaining value is at the end.
🎨 How is selection sort different?
🎨 Why is bubble sort slow?
🎨 What is a faster sorting algorithm?
Ask the tutor
Ask
🎨
Show me