Count number of occurrences (or frequency) in a sorted arrayGiven a sorted array arr[] and an integer target, the task is to find the number of occurrences of target in given array.Examples:Input: arr[] = [1, 1, 2, 2, 2, 2, 3], target = 2Output: 4Explanation: 2 occurs 4 times in the given array.Input: arr[] = [1, 1, 2, 2, 2, 2, 3], target = 4Output: 0Explana
9 min read