Bubble+Sort

Bubble sort is a simple and slow way to sort eliments into a one dimensional array. the general idea is tha, during a pass through the list, neighbouring values are compared and swapped if they are not in order. usually several steps are required before the numbers are all in order.


 * 1) start at the beggining of the array
 * 2) compare the values stored in elements 1 and 2
 * 3) if they are in the wrong desired order, swap them
 * 4) compare the next pair of values, in elements 2 and 3
 * 5) if they are in the wrong order, swap them
 * 6) values in adjacent elements until you reach the end of the array
 * 7) repeat the above steps until no swaps are needed