Cornerstone OnDemand interview question

Given a sorted array, find frequency of a given element.