fork download
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4.  
  5. public class Test
  6. {
  7. public static void Main()
  8. {
  9. var s = "abbccddeeffa";
  10. var repeatedChars = s.GroupBy(x => x).Where(y => y.Count() > 1).Select(z=>z.Key);
  11. Console.Write(string.Join(", ", repeatedChars));
  12. }
  13. }
Success #stdin #stdout 0.02s 131584KB
stdin
Standard input is empty
stdout
a, b, c, d, e, f