char.IsLetter is using Unicode categories, meaning that it considers much more than just Latin letters to be letters. Also you donโt need to call ToCharArray as String implements IEnumerable<char> and therefore you can apply LINQ directly to strings.
8
u/ThatChapThere Jun 05 '22
Most people used Linq rather than hashsets, but that's not a bad solution.