You are viewing a single comment's thread. Return to all comments →
In C#
public static int equalizeArray(List<int> arr) { int? mode = arr.GroupBy(i => i) .Select(x => x.Count()) .OrderByDescending(x => x) .FirstOrDefault(); return arr.Count - (mode ?? 0); }
Seems like cookies are disabled on this browser, please enable them to open this website
Equalize the Array
You are viewing a single comment's thread. Return to all comments →
In C#