I have a sorted Array of Integers. Given a number, how to find the number of occurences of that number in O(logn) even the worst case.
Binary search for the number, then binary search for the start and the end of the run.