Bob has a playlist of \(N\) songs, each song has a singer associated with it (denoted by an integer)
Favourite singer of Bob is the one whose songs are the most on the playlist
Count the number of Favourite Singers of Bob
Input Format
The first line contains an integer \(N\), denoting the number of songs in Bob's playlist.
The following input contains \(N\) integers, \(i^{th}\) integer denoting the singer of the \(i^{th}\) song.
Output Format
Output a single integer, the number of favourite singers of Bob
Note: Use 64 bit data type
Constraints
\(1 \leq N \leq 2*10^{5} \\ 1 \leq a[i] \leq 10^{15}\)
5 1 1 2 2 4
2
In this example
Songs of singer 1 and 2 appear 2 times(which is max) in this playlist
Therefore the answer is 2
Please login to use the editor
You need to be logged in to access the code editor
Loading...
Please wait while we load the editor
Login to unlock the editorial
Please login to use the editor
You need to be logged in to access the code editor
Loading...
Please wait while we load the editor