Count Occurrences Using Two Binary Searches
Problem: Count how many times a target appears in a sorted array.
Solution: Use TWO binary searches:
1. Find first occurrence (left-biased search)
2. Find last occurrence (right-biased search)
3. Calculate: count = last - first + 1
Time Complexity: O(log n) β Two O(log n)
searches