November 10th, 2015
Go to classroom Salon – Selection Sort Video
Classwork:
1. Show, in the style of the example trace with the given implementation,how selection sort sorts the array E A S Y Q U E S T I O N.
2. What is the maximum number of exchanges involving any particular element during selection sort? What is the average number of exchanges involving an element?
3. Give an example of an array of N items that maximizes the number of times the test a[j] < a[min] fails (and, therefore, min gets updated) during the operation of selection sort (given implementation).