Skip to content
Related Articles

Related Articles

Algorithms | Misc | Question 5

Improve Article
Save Article
  • Difficulty Level : Easy
  • Last Updated : 10 Jul, 2018
Improve Article
Save Article

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
Related Articles

Start Your Coding Journey Now!