leetcode 229[medium]--- Majority Element II

難度:medium 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. 思路:找到給定的array裏面,出現次數超過總長度 1/3 的element。用ha
相關文章
相關標籤/搜索