1、找出数组超过一半的数 class Solution { public: int MoreThanHalfNum_Solution(vector<int> numbers) { //思路如果超过一半,排序好的中间的值肯定是最多值 //采用快排,时间复杂度为O(nlogn+n)并非此题最优解 sort(numbers.begin(),numbers.end()); int a=numbers[numbers.size()/2]; int<