using System;
using System.Linq;
using System.Collections.Generic;
namespace MyCompiler {
class Program {
public static void Main(string[] args)
{
Console.WriteLine("Hello world!");
maxrepeat("system admin ");
maxrepeat("Computer Science");
maxrepeat("the quick brown fox jumps over the lazy dog");
}
public static void maxrepeat(string str)
{
var res = str.Where(x => char.IsLetter(x))
.GroupBy(x => x)
.ToDictionary(x => x.Key,x => x.Count().ToString()+x.Key.ToString());
string result = string.Join(", ",res.Values
.ToArray()
.Where(y => y.Contains(res.Values.ToArray().Max()[0]))
.Select(x => x[1]).ToArray());
Console.WriteLine(result);
}
}
}
To embed this project on your website, copy the following code and paste it into your website's HTML: