Question
Create a function in Python: Selection_Sort, take a list and implement the corresponding sorting algorithm using the list as if it is an array. Also
Create a function in Python: Selection_Sort, take a list and implement the corresponding sorting algorithm using the list as if it is an array. Also create a function populate that takes a list and an integer as size as inputs and populates the list with size number of randomly generated integers from -2,000,000 to +2,000,000. Note that size should not be bigger than 1,000,000. Also write the function name isSorted which takes a list (using it as an array) and return True if the array is sorted and False otherwise.
The steps are
1.Call the populate function to populate the array
2. Make a copy of your array
3. Call the sorting algorithm
4. Call isSorted to make sure the array is sorted
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