Question
using python Write a program to sort a list of value from largest to smallest using Selection Sort. The algorithm should sort-in-place and not create
using python
Write a program to sort a list of value from largest to smallest using Selection Sort. The algorithm should sort-in-place and not create a second array of sorted values
Challenge write a second function that sorts the list, but keeps the original list unsorted and returns a new sorted list. Hint: one approach is to create a copy of the original list and then sort it
Use the following main to test the code
# ------- main ----------
a = [4,2,7,6,3,4,1,9,7,6,2] mysort(a) print(a)
b = ["alpha", "sierra", "victor", "echo", "millie" ] mysort(b) print(b)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started