Concept Flow - Count Occurrences of Element in Sorted Array
Start
Input: Sorted Array, Target Element
Find First Occurrence Index
Find Last Occurrence Index
Calculate Count = Last - First + 1
Return Count
End
The process finds the first and last positions of the target in the sorted array, then calculates how many times it appears.
