I have to implements a function that takes a string as an input and finds the non-duplicate character from this string.
So an an example is if I pass string str = \"
you may use HashSet:
static void Main() { string textWithDuplicates = "aaabbcccggg"; Console.WriteLine(textWithDuplicates.Count()); var letters = new HashSet(textWithDuplicates); Console.WriteLine(letters.Count()); foreach (char c in letters) Console.Write(c); }