Find the number of occurrences of a given number in a sorted array
int get_lower_bound(int A[], int N, int target) {
int low = 0, high = N-1;
while(low <= high) {
int mid = (low + high) >> 1;
if(target <= A[mid]) // gist1
high = mid-1;
else
low = mid+1;
}
return low;
}
int get_upper_bound(int A[], int N, int target) {
int low = 0, high = N-1;
while(low <= high) {
int mid = low + (high - low) >> 1;
if(target < A[mid])
high = mid-1;
else
low = mid+1;
}
return low;
}
int count_occurrence(int A[], int N) {
}