Posted on July 15, 2021July 15, 2021 Description Submission class Solution { public: int search(vector<int>& nums, int target) { return upper_bound(nums.begin(), nums.end(), target) - lower_bound(nums.begin(), nums.end(), target); } }; By Bill0412 Easy LeetCode