Searching, Sorting & Selection

Answer & solution
Answer: B (no official key was published)
1. If a value occurs more than n/2 times, it must occupy the middle array position. Take that value as candidate and use binary searches for its first and last occurrences; accept exactly when the count exceeds n/2.
2. This needs Θ(log n) comparisons in the worst case. A logarithmic lower bound follows by locating a candidate-block boundary among linearly many possible positions while distinguishing length floor(n/2) from floor(n/2)+1.
3. Sortedness is essential; without it a linear majority scan is needed. Thus B.