The Mode
Return the mode of values: the number seen most often. When several numbers are seen equally often, the mode is the smallest of them.
Example 1
values [3,7,3,9,7,3]
returns 3
3 is seen three times.
Constraints
1 <= len(values) <= 60-20 <= values[i] <= 20
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.
More SciPy problems
- Which Way It LeansBeginner
- At Least K WinsEasy
- Best Fit LineEasy
- Calls in an HourEasy
- Chance BetweenEasy
- Cutoff for the TopEasy
- Rank AgreementEasy
- Ranks With Shared PlacesEasy