using System.Collections;
public static void Main()
Console.WriteLine("{0}", isIsogram("abcdefg"));
Console.WriteLine("{0}", isIsogram("abCcdef"));
Console.WriteLine("{0}", isIsogram("bacb"));
Console.WriteLine("{0}", isIsogram("fgabb"));
Console.WriteLine("Max occurrence: {0}", maxOccurrence("Hello World"));
public static Char maxOccurrence(string w){
return w.ToLower().GroupBy(x => x).Select(g => new { Symbol = g.Key, Count = g.Count() }).OrderByDescending(x => x.Count).First().Symbol;
int oc = ww.Where(x => x == chr).Count();
public static bool isIsogram(string w) {
return w.ToLower().GroupBy(x => x).Select(g => new { Symbol = g.Key, Count = g.Count() }).Any(x => x.Count > 1);
for (int i = 0; i < w.Length - 1 && !r; i++) {
string l = w.Substring(i,1);
if ( w.ToLower().IndexOf(l.ToLower(),i + 1) > -1) {