Question: Write a program that implements the following search algorithms: Selection Sort Bubble Sort Merge Sort Quick Sort Create an array of randomly selected whole numbers

Write a program that implements the following search algorithms:

  • Selection Sort
  • Bubble Sort
  • Merge Sort
  • Quick Sort

Create an array of randomly selected whole numbers of 1,000 elements

  1. Each value is selected from the range 0-999

  1. Sort that array using each method
  1. Make sure to copy the initial array into a new one so that the tests will be accurate and not be sorting sorted arrays
  2. Do not create new arrays for each algorithms as they serve as the control
  3. Show that each method successfully sorted the array
  4. Count the number of checks each method had to perform before fully sorting the array
    1. HINT: The inner most loop or inner most recursion is where the count should be performed.
  5. Keep track of the total number of checks for each algorithm

Step by Step Solution

3.43 Rating (153 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Certainly Below is a Python program that implements the mentioned sorting algorithms Selection Sort ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Algorithms Questions!