(尊重劳动成果,转载请注明出处:http://blog.csdn.net/qq_25827845/article/details/70917827冷血之心的博客)
欢迎关注微信公众号(文强的技术小屋),学习更多技术知识,一起遨游知识海洋~
开始在LeetCode上多学习别人的算法,加油~~~
题目链接地址:https://leetcode.com/problems/majority-element/#/description
题目描述:
Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋
times. Y