We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Migratory Birds
Migratory Birds
Sort by
recency
|
3466 Discussions
|
Please Login in order to post a comment
python 3
My solution in java. with this code i am not able to pass two test cases. can any one suggest something. int n = sc.nextInt();
My solution on golang :) I was surprised because this solution performed better than the first one I made using a MAP.
Simply made a frequency array of size 5 and intialized it to 0 then just update for each bird id 1-5 then return index of the max value + 1 because frequency for id x is found at index x-1
Python 3
Solution with collections.Counter