Question: Implement (or use your code from previous practice and/or labs) selection, bubble, and insertion sort. For each algorithm, count the number of times it loops

Implement (or use your code from previous practice and/or labs) selection, bubble, and insertion sort. For each algorithm, count the number of times it loops (you can make the sort methods return an integer with this count). Call each sorting algorithms on the following types of arrays:

an array of 10 integers already sorted into ascending order an array of 10 integers in the opposite order an array of 10 random integers between 0 and 99 an array of 100 integers already sorted into ascending order an array of 100 integers in the opposite order

an array of 100 random integers between 0 and 99

Create a table of the number of times each algorithm looped for each type of array, save the table in a PDF document, and upload that document to Pilot along with your code.

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!