Premium problem83. Most Frequent Value

Medium Locked

Return the most frequent value in the non-negative integer array Z. If there is a tie, return the smallest such value.

Input

[1 2 2 3 3 3 4]

Output

3

Premium problem

This one's part of Premium. Unlock the full NumPy track plus every other premium problem on the site.

Implement solve(...)