[LeetCode] Majority Element II 求众数之二(大于n/3)
Given an integer array of size n, find all elements that appear more than ⌊ n/3 ⌋ times. The algorithm should run in linear time and in O(1) space.Hint:How many majority elements could it possibly hav...
转载
2018-05-11 14:47:32 ·
309 阅读 ·
0 评论