31. Most Frequent Value

Medium

Return the most frequent (mode) value in the non-negative integer tensor Z. If multiple values are tied for most frequent, return the smallest one.

Implement solve(...)