Problems > Third Distinct Maximum > Editorial

Third Distinct Maximum — Solution & Editorial

Back to the Problem

Keep the top three distinct values in one pass, or deduplicate and sort.

Complexity: O(N)