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
|
3625 Discussions
|
Please Login in order to post a comment
Here is my simple C++ solution,
int migratoryBirds(vector arr) {
}
Here is my Python solution
def migratoryBirds(arr) freq = {}
end
Python
def migratoryBirds(arr): # Write your code here res = [] for i in range(5): res.append(arr.count(i+1)) return res.index(max(res))+1
Why can't I use statistics.mode(arr) to solve it.