Skip to content

Latest commit

 

History

History

High Frequency

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Given a list of integers nums, find the most frequently occurring element and return the number of occurrences of that element.

Constraints

0 ≤ n ≤ 100,000 where n is the length of nums Example 1 Input nums = [1, 4, 1, 7, 1, 7, 1, 1] Output 5 Example 2 Input nums = [5, 5, 5, 5, 5, 5, 5] Output 7 Example 3 Input nums = [1, 2, 3, 4, 5, 6, 7] Output 1