Question: Write a program that implements the following search algorithms: Selection Sort Bubble Sort Merge Sort Quick Sort Next test the efficiency of each using the

Write a program that implements the following search algorithms:

Selection Sort Bubble Sort Merge Sort Quick Sort

Next test the efficiency of each using the following steps: Create an array of randomly selected whole numbers of 1,000 elements Each value is selected from the range 0-999 Sort that array using each method Make sure to copy the initial array into a new one so that the tests will be accurate and not be sorting sorted arrays Show that each method successfully sorted the array Count the number of checks each method had to perform before fully sorting the array Keep track of the total number of checks for each algorithm Finally at the end give the average number of checks using each algorithm.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!