This algorithm generates at random a list of unordered items and steps us through the algorithm known as Selection Sort.  

1) Begin by stepping through for the 10 element list shown.  Keep stepping until the algorithm says that it is done, while noting the number of comparisons.  

How is the total number obtained as a sum?

2) Change the "radio button" to 20, which will result in a 20 element list being generated at random and then sorted.  Record the number of comparisons.

3) Change the "radio button" to 40, which will result in a 40 element list being generated at random and then sorted.  Record the number of comparisons.

What happens to the number of comparisons each time the list size is doubled?

10 20 40 80

Number of comparisons thus far: