Question: Define a class named Sorting containing five methods: bubble sort, selection sort, insertion sort, quick sort, and merge sort. Each method should take an unsorted

Define a class named "Sorting" containing five methods: bubble sort, selection sort, insertion sort, quick sort, and merge sort. Each method should take an unsorted list as input and return the sorted list in ascending order. In the main program, create a function that generates a random list. Repeat the experiment 10,000 times and record the average time taken (in either nanoseconds or seconds). Test each of the five sorting methods using the following list sizes: 5000, 50000, 75000, and 100000.

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!