Simple bubble sort algorithm