Skip to content
Related Articles

Related Articles

Improve Article

Algorithms | Misc | Question 5

  • Difficulty Level : Easy
  • Last Updated : 10 Jul, 2018

The minimum number of comparisons required to determine if an integer appears more than n/2 times in a sorted array of n integers is
(A) \theta(n)
(B) \theta(logn)
(C) \theta(log*n)
(D) \theta(n)

(A) A
(B) B
(C) C
(D) D


Answer: (B)

Explanation: Please see the post Check for majority element in a sorted array for details.

Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :