Selection Sort
•
Next, think about exchanges.
•
Every time we find the largest...we perform
a swap.
•
This causes 3 data moves (3 assignments).
•
This happens N-1 times!
•
Therefore, a selection sort of N elements
requires 3*(N-1) moves.