数组中重复的数字3种解法 数组中重复的数字 数组中重复的数字 题目链接:https://leetcode.cn/problems/shu-zu-zhong-zhong-fu-de-shu-zi-lcof/ 题解一:排序+遍历数组 代码如下: class Solution { public: int findRepeatNumber(vector<int>& nums) { sort(nums.begin(),nums.end()); for(int i = 1; i < nums