Question: b) Write down the recurrence relation of the following sorting algorithm. What is the time complexity of this method (in O() notation)? Justify your answer.

b) Write down the recurrence relation of the following sorting algorithm. What is the time complexity of this method (in O() notation)? Justify your answer. [10 pt] void Strangesort(int a[], int min, int max) [ if (min max) if (a[min] > a [max]) int one-third = (max - min 1) / 3; return; swap (a [min], a[max]); // constant-time operation if (one-third >= 1) { StrangeSort(a], min, max - one third); Strangesort(al], min + one_third, max); StrangeSort (aL], min, max - one_third)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
