Median of Medians

Using the algorithm described for the median-of-medians selection algorithm, determine what the list of medians will be on the following input.

\(A = [1,2,3,4,5,1000,8,9,99]\)

median_of_medians(A,7)

Hint: In the code, medians is the list of these medians.

Bonus: Feel free to run the code and add some strategic print messages.

×

Problem Loading...

Note Loading...

Set Loading...