Bubble Sort Bonus Page

This page is dedicated to the art of bubble sort, a sorting algorithm so inefficient, it's almost... fun?

Why is bubble sort so great?

It's great because it allows you to sort a list of items in the most roundabout way possible! Just like a bubble in a champagne glass, our algorithm gently rocks back and forth, leaving no stone unturned (except when it gets stuck in an infinite loop).

How to implement bubble sort:

Just follow the steps below, and voilĂ ! You'll have a sorted list in no time (or not).

Step 1: Get a good cup of coffee

Trust us, it helps.

Step 2: Compare the first two items

Compare them, compare them, compare them, until you get a headache from all the comparisons.

Step 3: Swap them if necessary

Because, why not? It's not like it's going to affect the overall performance of your computer or anything.

Learn more about quick sort, the algorithm that's just too good to be true. Discover the dark side of heap sort, where the worst-case scenario is the only scenario that matters.