You are given a sorted array. Write an algorithm to check whether a given integer's frequency is greater than (\( \frac{n}{2}\)). (n is the number of integers in the array).
We can use binary search. The algorithm works as :
Time complexity = \( O(logn) \). |