Floats numbers to the top to order them from least to greatest Compares 2 numbers. swap if you need to. Eventually, the biggest number will bubble to the rightmost side.