Migratory Birds another simple looking problem from hackerRank let's solve it using python.

Problem Description

You have been asked to help study the population of birds migrating across the continent. Each type of bird you are interested in will be identified by an integer value. Each time a particular kind of bird is spotted, its id number will be added to your array of sightings. You would like to be able to find out which type of bird is most common given a list of sightings. Your task is to print the type number of that bird and if two or more types of birds are equally common, choose the type with the smallest ID number.

For more details about the problem visit : Migratory Birds

Sample Input

11
1 2 3 4 5 4 3 2 1 3 4

Sample Output

3

If you got any better way to solve this let me know in the comment box.