During the design and analysis process of an algorithm to find the kth smallest element in an unsorted array, a researcher proposes using a modified…
During the design and analysis process of an algorithm to find the kth smallest element in an unsorted array, a researcher proposes using a modified divide-and-conquer approach that always divides the array into five nearly equal parts, recursively selects the median of each part, and then finds the median of those medians to use as a pivot for partitioning.
Which of the following best describes the time complexity and design implication of this algorithm?
Show answerHide answer
Correct answer: (A) O(n); because the median-of-medians approach ensures balanced partitions and linear-time selection.