FunctionRacerProblemsRace

Most Common Value

EasyNumPyPython

Every number in nums is a whole number from 0 to 20. Return the value that appears most often. If several values tie, return the smallest of them. Hint: np.bincount.

Example 1

nums [2,5,5,2,7]
returns 2

2 and 5 both appear twice; the smaller is 2.

Constraints

Race itor take your time

Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.

More NumPy problems