What should be the time complexity of this one?
Given array of n elements leading element of the array is the element which repeated more than n/2 times in array. What is time complexity to find the leading element in array s.t.
- $\theta$($logn)$
- $\theta$(n)
- $\theta$ $(nlog n)$
- $\theta$$(n^2)$
With a proper explanation, please.