You are viewing a single comment's thread. Return to all comments →
SOLUTION USING PYTHON
def migratoryBirds(arr): maxOfarr = max(arr) temp = [0]*(maxOfarr+1) for i in arr: temp[i] += 1 maxOfTemp = max(temp)
mainList = [] for i in range(len(temp)): if temp[i] == maxOfTemp: mainList.append(i) break return mainList[0]
Seems like cookies are disabled on this browser, please enable them to open this website
Migratory Birds
You are viewing a single comment's thread. Return to all comments →
SOLUTION USING PYTHON
def migratoryBirds(arr): maxOfarr = max(arr) temp = [0]*(maxOfarr+1) for i in arr: temp[i] += 1 maxOfTemp = max(temp)