LeetCode 229: Majority Element II
Problem Restatement We are given an integer array nums of size n . We need to return all elements that appear more than: floor(n / 3) times. The answer can be returned in any order. LeetCode examples include nums = [3,2,3] , which returns [3] , and nums = [1,2] , which returns [1,2] . The constraints are 1 <= nums.length <= 5 * 10^4 and -10^9 <= nums[i] <=...