Groups Of Three
Median of medians picks its pivot by splitting the input into groups of 5, taking each group's median, and recursing to find the median of those medians. The 6.046 analysis shows at least elements fall on each side of that pivot, which yields
and this solves to . A student proposes groups of 3 instead, since sorting a group of 3 is cheaper. What does that change?
Sign in to answer questions and track your progress
Sign In