Jun 30, 2017

A Python Counter is a container that keeps track of how many times equivalent values are added. It can be used to implement the same algorithms for which bag or multiset data structures are commonly used in other languages.


from collections import Counter
n = input()
arr = Counter(map(int, raw_input().split()))
print arr.most_common(1)[0][0]
Post a Comment

Featured Post

Trading volumes of most major cryptocurrencies across leading exchanges remain low overall

Bitcoin's daily trading volume has been relatively low