Exact comparisons for min and max
You must find both the minimum and the maximum of distinct numbers using the fewest element comparisons. Work out the exact minimum number of comparisons that always suffices (not the ballpark — the precise integer).
Show hints (2)+
- Pair the numbers first: pair-offs split them into max-candidates and min-candidates.
- Then to reduce each group; total . Derive the , don't just quote .
Answer
Reveal answer →Final answer
148
Want the full step-by-step worked solution? It's part of Premium — along with a worked solution for every question in the bank.