← 返回 meta 的题目列表Count Occurrences in Sorted Array
类型:online_judge
Given a sorted array and a number, count how many times the number appears in the array.
Example:
Input: Number 20, Array [10, 10, 20, 20, 30, 30] Output: 2
Example
Input
20
10 10 20 20 30 30