Description
Submission
class Solution { public: int findRepeatNumber(vector<int>& nums) { vector<int> counter(nums.size()); for(int i = 0; i < nums.size(); ++i) { counter[nums[i]]++; if(counter[nums[i]] > 1) return nums[i]; } return nums.back(); } };