Sponsored
Use these hints if you're stuck. Try solving on your own first.
Find frequencies of all elements of the array.
Find the elements that have the maximum frequencies and count their total occurrences.
Solve with full IDE support and test cases