If an element occurs more than n/2 times, it WILL be present in the middle of the sorted array.
Now, counting the occurrences in a sorted array can easily be done by binary search.
We need to find boundary indices.
We can intuitively do it by performing a linear search on left and right directions to find the boundary indices. But, this takes linear time in the worst case (all elements are same)
Better way is to delete the equality condition from the binary search algorithm.
ie, delete a[k] = x method.
Now, we're only left with a[k] > x and a[k] < x.
Now, instead of returning -1 on an unsuccessful search, return i
We can do manipulations like these to get a boundary index.
Then, reverse this algo to get the other boundary index.
Subtract both these indices to check if the value is $\geq n/2$