原题链接:https://leetcode-cn.com/problems/zai-pai-xu-shu-zu-zhong-cha-zhao-shu-zi-lcof/
int search(vector<int>& nums, int target) {
int ans = 0;
for (auto x : nums) {
if (x == target) ans++;
}
return ans;
}
原题链接:https://leetcode-cn.com/problems/zai-pai-xu-shu-zu-zhong-cha-zhao-shu-zi-lcof/
int search(vector<int>& nums, int target) {
int ans = 0;
for (auto x : nums) {
if (x == target) ans++;
}
return ans;
}