Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static IEnumerable<char> Calculate(string stringValue)
- {
- return stringValue
- .GroupBy(i=>i)
- .Select(g=>new{Symbol=g.Key,Count=g.Count()})
- .OrderByDescending(i=>i.Count)
- .GroupBy(i=>i.Count)
- .First()
- .Select(g=>g.Symbol);
- }
Advertisement
Add Comment
Please, Sign In to add comment