A bubble sort is the simplest of the sorting algorithms. However, it is an inefficient sort for anything but a small list because of the number of comparisons required. A written description algorithm ...
Each run through the list, from start to finish, is known as a pass. The bubble sort continues until a pass is made where no values have been swapped. At this point, the list is sorted. 4, 27, 7, 12, ...