标签:剑指offer ret tor code -- nbsp shu vector blog
class Solution { public: int GetNumberOfK(vector<int> data, int k) { int data_size = data.size(); int cishu = 0; for (int i = 0; i < data_size; ++i) { if (data[i] == k) { ++cishu; } } return cishu; } };
标签:剑指offer ret tor code -- nbsp shu vector blog
原文地址:http://www.cnblogs.com/159269lzm/p/7262267.html