Given an integer array nums, compute the frequency of each distinct value. Let the maximum frequency among all values be the largest count of any value in nums. Return the total number of elements in nums whose values occur with this maximum frequency.
Note: The returned value is the sum of frequencies of all distinct values that tie for the maximum frequency.
Constraints:
nums.length
nums[i]
Given an integer array nums, compute the frequency of each distinct value. Let the maximum frequency among all values be the largest count of any value in nums. Return the total number of elements in nums whose values occur with this maximum frequency.
Note: The returned value is the sum of frequencies of all distinct values that tie for the maximum frequency.
Constraints:
nums.length
nums[i]