the new button to do another sortpress the new button new creates new set of bars and initializes the sorting routine repeated presses of new toggle between two arrangements of barsa random orderas shown in figure and an inverse ordering where the bars are sorted backward this inverse ordering provides an extra challenge for many sorting algorithms the step button the real payoff for using the bubblesort workshop applet comes when you singlestep through sort you can see exactly how the algorithm carries out each step start by creating new randomly arranged graph with new you'll see three arrows pointing at different bars two arrowslabeled inner and inner+ are side by side on the left another arrowouterstarts on the far right (the names are chosen to correspond to the inner and outer loop variables in the nested loops used in the algorithm click once on the step button you'll see the inner and the inner+ arrows move together one position to the rightswapping the bars if appropriate these arrows correspond to the two players you comparedand possibly swappedin the baseball scenario message under the arrows tells you whether the contents of inner and inner+ will be swappedbut you know this just from comparing the barsif the taller one is on the leftthey'll be swapped messages at the top of the graph tell you how many swaps and comparisons have been carried out so far ( complete sort of bars requires comparisons andon the averageabout swaps continue pressing step each time inner and inner+ finish going all the way from to outerthe outer pointer moves one position to the left at all times during the sorting processall the bars to the right of outer are sortedthose to the left of (and atouter are not the size button the size button toggles between bars and bars figure shows what the random bars look like you probably don' want to single-step through the sorting process for barsunless you're unusually patient press run insteadand watch how the blue inner and inner+ pointers seem to find the tallest unsorted bar and carry it down the row to the rightinserting it just to the left of the previously sorted bars figure shows the situation partway through the sorting process the bars to the right of the red (longestarrow are sorted the bars to the left are beginning to look sortedbut much work remains to be done