Page 126 - Data Structures Handout_Neat
P. 126

10.2.2  Selection Sort

                       Selection Sort works by repeatedly finding the smallest (or largest) element from the

               unsorted portion of the array and placing it at the beginning. It reduces the number of swaps
                                                               
               compared to Bubble Sort but still requires   (   )⁡comparisons.
                       Example: Selection Sort in C++













































                                                            126
   121   122   123   124   125   126   127   128   129   130   131