You are viewing a single comment's thread. Return to all comments →
Good occasion to take a functional approach. C# with LINQ:
Console.ReadLine(); string[] numbers = Console.ReadLine().Split(' '); int countMostCommon = numbers.GroupBy(c => c) .Max(group => group.Count()); Console.WriteLine(numbers.Length - countMostCommon);
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 →
Good occasion to take a functional approach. C# with LINQ: