You are viewing a single comment's thread. Return to all comments →
C# solution
public static string pangrams(string s) { var lowerString = s.ToLower(); char[] characters = lowerString.ToCharArray().Where(e => !string.IsNullOrEmpty(e.ToString().Trim())).ToArray(); var charList = new List<char>(); foreach(var character in characters) { if(charList.Any(e => e == character)) continue; charList.Add(character); } if(charList.Count == 26) return "pangram"; return "not pangram"; }
Seems like cookies are disabled on this browser, please enable them to open this website
Pangrams
You are viewing a single comment's thread. Return to all comments →
C# solution