The Bubble Sort can be viewed as individual elements "bubbling" up to their proper positions. The "highest" one is guaranteed to arrive at its position during the first execution of the while-do loop, although others may also. Each subsequent execution of the while-do loop guarantees the correct placement of at least one element. This loop will be executed a minimum of once and a maximum of (elements - 1) times. Once all of the elements are in the appropriate order, the loop will be executed one more time unless it has already been executed the maximum number of times. This example will demonstrate the bubbling up of both the 20 and 47. These will both be properly placed after a single iteration of the while-do loop. Since one or more values will have been moved, the second iteration of the loop will be used to ensure that all values are then in their proper locations.