Skip to content
All tags

#median-of-medians

1 posts

How Median of Medians Guarantees Linear-Time Selection | Stanford CS161 Lecture 4

Selection does not require sorting. Median of medians groups elements by five, selects the median of the group medians as a pivot, and guarantees that the larger recursive side has at most 7n/10+5 elements; substitution proves O(n) worst-case time.