Searching, Sorting & Selection

Answer & solution
Answer: C (no official key was published)
1. A comparison decision tree must distinguish n! possible input permutations, so its worst-case height is at least ceil(log2(n!))=Ω(n log n). Mergesort or heapsort attains O(n log n), making that the tight order of the worst-case comparison bound, C.
2. Teaching check: A binary comparison tree of height h has at most 2h leaves. Distinct orderings need separate leaves, so 2h≥n!. Summing logarithms or using Stirling’s estimate gives log2(n!)=Θ(n log n). This lower bound applies to comparison sorting, not every integer-key sorting method.