剑指offer--34.数字在排序数组中出现的次数

时间限制:1秒 空间限制:32768K 热度指数:209611
本题知识点: 数组

题目描述

统计一个数字在排序数组中出现的次数。
class Solution {
public:
    int GetNumberOfK(vector<int> data ,int k) {
        return count(data.begin(), data.end(), k);
    }
};
原文地址:https://www.cnblogs.com/langyao/p/10625422.html