AlgoBazaAlgoBaza
Back to algorithms

Bubble Sort

Compares neighbouring elements and swaps them when they are in the wrong order. After every pass the largest element "floats" to the end — like a bubble.

Podstawowy
O(n^2)O(1)BOBRALEMOZGIINSTALOGIK

🫧 Bubble Sort — Games

Play both games to master the algorithm!

šŸ’”

Tip: Start with Game 1 — you'll learn to predict what one pass does. In Game 2 you run every step of the algorithm yourself, exactly like tracing code on paper in a contest.