Question: Please write in C and comment so I can understand what is going on exactly. Thank You. The two sorts are bubblesort and quicksort. Randomly
Please write in C and comment so I can understand what is going on exactly. Thank You.
The two sorts are bubblesort and quicksort.
Randomly generate integers in the range 0-99 for your random numbers.
Do this 10 times:
Generate a random list of 100 items
Have each algorithm sort the list.
Give the original list, the sorted list, and the number of comparisons done by each algorithm.
At the end:
For each algorithm and each list length give the average of the number of comparisons.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
