Majority Element II
Problem Statement:
Given an integer array of size n, find all elements that appear more than ⌊ n/3 ⌋ times.
Example:
Input: nums = [3,2,3]
Output: [3]
Intuition:
Koi algorithm lagegi yaad ni aa rahi
Code:
My Solution
Select a result to preview
Given an integer array of size n, find all elements that appear more than ⌊ n/3 ⌋ times.
Input: nums = [3,2,3]
Output: [3]
Koi algorithm lagegi yaad ni aa rahi