Question: 10. [Question total: 6 ma (a) [3 marks] How many key comparisons will be done during a 7-sort (that is, shellsort with h =
![10. [Question total: 6 ma (a) [3 marks] How many key comparisons](https://dsd5zvtm8ll6.cloudfront.net/questions/2024/03/65ed7a2247afc_1710065631597.jpg)
10. [Question total: 6 ma (a) [3 marks] How many key comparisons will be done during a 7-sort (that is, shellsort with h = 7) of a list of 21 numbers if the keys in the initial list are in sorted order (and each key is unique)? (This is just for the 7-sort phase, not the complete sort). (b) [3 marks] How many comparisons would a 1-sort take on the list that results from the 7-sort in the previous part?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
