Return the most frequent value in the non-negative integer array Z. If there is a tie, return the smallest such value.
Z
Input
[1 2 2 3 3 3 4]
Output
3
This one's part of Premium. Unlock the full NumPy track plus every other premium problem on the site.
solve(...)