Bubble sort is a sorting algorithm that works by repeatedly swapping elements in an array until it is in order. It's like the friend zone for algorithms.

How It Works

Here's how it works:

			for i from 0 to length-1 do
				for j from i+1 to length-1 do
					if array[i] > array[j]
						swap array[i], array[j]
				end if
			end for
		end for
		

This algorithm is so simple, it's almost... almost... not even an algorithm!

Selection Sort? More like Selection Committee! Insertion Sort? More like Insertion Infection!