Practice

Selection Sort G to L

The Selection Sort code we saw sorts an array from least to greatest. Modify the code so that the code sorts an array from greatest to least.

💻 Template code

Solution code

Selection Sort First 3

The Selection Sort code we saw sorts all the elements of an array from least to greatest. Modify this code so that the code sorts only the first three elements of an array.

💻 Template code

Solution code

Selection Sort Even

The Selection Sort code we saw sorts all the elements of an array from least to greatest. Modify this code so that the code sorts only the elements at the even indexes, ignoring elements at odd indexes.

💻 Template code

Solution code

Previous Section

16.4 Analyzing Selection Sort (using Big-O)

Next Chapter

Ch. 16 Quiz

<aside> ⚖️ Copyright © 2021 Code 4 Tomorrow. All rights reserved. The code in this course is licensed under the MIT License.

If you would like to use content from any of our courses, you must obtain our explicit written permission and provide credit. Please contact [email protected] for inquiries.

</aside>