摘要: Find thekth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element.For exampl... 阅读全文
posted @ 2015-10-21 21:36 whu.yt 阅读(187) 评论(0) 推荐(0) 编辑
摘要: Given an integer array of sizen, find all elements that appear more than⌊ n/3 ⌋times. The algorithm should run in linear time and in O(1) space.如果没有这时... 阅读全文
posted @ 2015-10-21 15:28 whu.yt 阅读(143) 评论(0) 推荐(0) 编辑
摘要: Given an array of sizen, find the majority element. The majority element is the element that appears more than⌊ n/2 ⌋times.You may assume that the arr... 阅读全文
posted @ 2015-10-21 14:58 whu.yt 阅读(159) 评论(0) 推荐(0) 编辑