An implementation of the dreaded bubble sort algorithm