Home » Selection Sort

Cool Links

  • No bookmarks avaliable.

Selection Sort

The Selection Sort uses an incremental approach. During the first pass the smallest value is selected from the entire array and swapped with the first element. On the second pass the smallest value is selected from the array beginning with the 2nd element and swapped with the second element, etc….the above description is for an ascending sort. The following shows the sequence of steps in a Selection Sort:

 
 
Discussion
A disadvantage of the selection sort is that it will not allow an early exit from the entire process if the list becomes ordered in an early pass.

Classroom Codes:

APCS: 1otuje
Intro to CS: 4gvmqlo
Principles of CS: 0uk9fez
Web Design: pfiz8m