不为成仙,只为在这红尘中等你回来。

169. Majority Element [Easy] [Array]

    ### 题意 Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times. 给定一个大小为 n 的数组,找到其中的众数。众数是指在数组中出现次数大于 ⌊ n/2 ⌋ 的元素。 You may assume that the array is non-empty and the major...

    阅读全文>>

2018年3月31日 22:04 作者:nancy 分类:[LeetCode] 1332