Given a sorted array, find the frequency of a given number in the array. example: array->1 1 2 2 3 4 5 5 5 5 5 5 6 number to find -> 5 answer: 6
k*a
2 楼
lg(n)
【在 e********c 的大作中提到】 : Given a sorted array, find the frequency of a given number in the array. : example: array->1 1 2 2 3 4 5 5 5 5 5 5 6 : number to find -> 5 : answer: 6