Question: In the algorithm to nd the median in linear time, we grouped the elements into groups of 5 and used the medians of these groups.

In the algorithm to nd the median in linear time,
In the algorithm to nd the median in linear time, we grouped the elements into groups of 5 and used the medians of these groups. However what would happen if we had used groups of a different size? Consider the following cases: 1. we use groups of size 3 2. we use groups of size 7 In both cases write the recurrence for the running time of the algorithm and solve the recurrences to get the running times. You do not need to prove the correctness of your solution to the recurrences

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 Mathematics Questions!