Question: can I get help with this algorithm question please? 7. (10 pts) In class, we saw a deterministic O(n) time algorithm to compute the kth

can I get help with this algorithm question please?
7. (10 pts) In class, we saw a deterministic O(n) time algorithm to compute the kth smallest element in an unsorted array S of n numbers. The main idea to get the linear time algorithm was to find a good pivot element. This was done by partitioning the array S into n/5 sets of size 5. Then computing the median of each of these sets of size 5, resulting in a set of n/5 medians. The pivot element is the median of these n/5 medians and is computed recursively. What if we partition the array S into n/3 elements of size 3, instead. (a) (3 pts) How many elements are guaranteed to be smaller than the pivot and how many are guaranteed to be larger than the pivot? Explain your reasoning (you do not need to give a formal proof). (b) (3 pts) Give the recurrence for the new running time of the algorithm (c) (4 pts) Solve the recurrence using any method of your choice and state the running time of the algorithm in terms of n using Big-Oh notation
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
