Problems > Election Night > Editorial

Election Night — Solution & Editorial

Back to the Problem

Count votes in a map; among maximal counts take the lexicographically smallest name.

Complexity: O(N)