摘要: 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. Hi 阅读全文
posted @ 2016-10-09 10:41 wxquare 阅读(159) 评论(0) 推荐(0) 编辑
摘要: Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times. You may assume that the 阅读全文
posted @ 2016-10-09 10:40 wxquare 阅读(166) 评论(0) 推荐(0) 编辑