Find occurrences of a number in sorted array (allow duplicates).
Sigiloso
Use binary search to find the number (O(logN)). Once that is done you can search around that index. Though that could become O(N). Better answer: run binary search again twice once you have found the number the first time. For the upper half and the lower half - so total run time is O(logN)