-
Notifications
You must be signed in to change notification settings - Fork 88
Open
Description
According to the book's definition, selection sort always looks for the largest value; however, examples show an alternative version of selection sort, where we search for the minimum value and place it in the correct spot. To reduce confusion, we can change the definition of the selection sort to include both the minimum and the maximum number versions.
The selection sort improves on the bubble sort by making only one exchange for every pass through the first part of the vector. We will call this a step. In order to do this, a selection sort looks for the largest value as it makes a partial pass and, after completing the partial pass, places it in the proper location, ending the step.
Metadata
Metadata
Assignees
Labels
No labels