Majority Number
题目:
Given an array of integers, the majority number is the number that occurs more than half of the size of the array. Find it.
分析:
扔掉俩不一样的数,剩下的数就是主元素
解法:
Last updated
题目:
Given an array of integers, the majority number is the number that occurs more than half of the size of the array. Find it.
分析:
扔掉俩不一样的数,剩下的数就是主元素
解法:
Last updated