Back to the Problem
Keep the top three distinct values in one pass, or deduplicate and sort.
Complexity: O(N)