Question: Consider the following list: 3 2 , 2 4 , 1 7 , 4 7 , 5 3 , 1 2 , 8 , 2

Consider the following list: 32,24,17,47,53,12,8,26. In each of the following show enough details so that one can follow how the sort is done.
(a) Perform Selection Sort on this list. Indicate how many compares and exchanges you do in each iteration and in total.
(b) Perform Insertion Sort on this list. Indicate how many compares and exchanges you do in each iteration and in total.
(c) Perform Shellsort on this list by doing a 4-sort, then a 1-sort. Indicate how many compares and exchanges you do in each iteration and in total.
(d) Perform Mergesort on this list by doing a 4-sort, then a 1-sort. Indicate how many compares and exchanges you do in each iteration and in total.

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!