You are viewing a single comment's thread. Return to all comments →
just to get the Key where value = max.
i think this code is better
var newArr = new int[n]; for (int i = 0; i < n; i++) { newArr[ar[i]]++; } var result = Array.IndexOf(newArr,newArr.Max()); return result;
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 →
just to get the Key where value = max.
i think this code is better