Completed bubble sort.