logo CodeStepByStep logo

selection_sort_largest

Language/Type: Python lists collections

Write a function named selection_sort_largest that is a modified version of the provided selection sort algorithm that selects the largest element each time and moves it to the end of the list, rather than selecting the smallest element and moving it to the beginning.

(Due to limitations of our site, we are unable to actually check whether you made the modification to select/move the largest element. We will check that your algorithm still sorts properly, but it is up to you or your TA/instructor to verify that you made the proper modification.)

Function: Write a Python function as described, not a complete program.

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.