LeetCode-2 Given an integer array of size n, find all elements that appear more than ⌊ n/3 ⌋ times.
Givenanintegerarrayofsizen,findallelementsthatappearmorethan⌊n/3⌋times.Note:ThealgorithmshouldruninlineartimeandinO(1)space.Example1:Input:[3,2,3]Output:[3]Example2:Input:[1,1,1,3,3,2,2,2]Output:[1,2]