The BubbleSort compares each successive pair of elements in an unordered list and inverts the elements if they are not in order.
The following example illustrates the bubble sort on the list {6,5,3,1,8,7,2,4} (pairs that were compared in each step are encapsulated in '**'):
{6,5,3,1,8,7,2,4}
{**5...