We compare the last element with the previous one, if the last one is less than the previous,
we swap them (otherwise we do nothing).
Then we compare the second from the end and the third from the end elements, if the second is less than
the third, we swap them.
Then we compare the third and the fourth elements from the end, if the third is less than the fourth,
we swap ...
We keep doing this until we reach the beginning of the array. When we reached the first of the array
the smallest element now takes the first position (its own place).
Now we start all over again, but this time we'll stop when we reach the second element of the array,
because the first element is already sorted and there is no reason to check it again. After the second
time going through the array the first two elements are sorted.
Now we repeat the same steps, but stop when we reach the third element of the array, etc.
As you can guess, this method is called bubble sort because smaller elements are going up like
bubbles in water.