Question: 7. Consider the following proposed sorting algorithm supersort (int n, int start, int end, keytype SI1)1 if(n > 1) { if (SIstart] > S[end]) swap
7. Consider the following proposed sorting algorithm supersort (int n, int start, int end, keytype SI1)1 if(n > 1) { if (SIstart] > S[end]) swap SIstart] with Stend]; supersort(n-l, start, end-1, s) supersort (n-1, start+, end, S) a) 3 pts) Give a recurrence relation (with initial condition) that describes the complexity of this sort algorithm b) (4 pts) Solve the recurrence froma) c) (3 pts) Is supersort guaranteed to correctly sort the list of items? Justify your answer. (A formal proof of correctness is not required, but you need to do more than show one or two examples.)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
