
Note the reuse of the algorithm for finding largest (Steps 514).
[**] There are several
versions of the selection sort, but they all include the basic operation of exchanging
two values and putting them in order. The "bubble sort" is one such variation that restricts the exchanges to adjacent items. Which one is better in terms of complexity?
There is at least one aspect of this algorithm that does not meet the requirements set out previously. What is that?
CS1104 Main Page
Last Updated 2002/02/01
© L.Heath, 2000, edited by J.A.N. Lee on above date.