Practice ยท 3 of 4
Group and count
CHALLENGE
Difficulty: beginner+25 XP
Implement static Dictionary<string, int> CountByFirstLetter(IEnumerable<string> words) โ group words by char.ToLowerInvariant(word[0]) as key; and static Dictionary<int, int> CountByLength(IEnumerable<string> words) โ group by length. Null/empty input โ empty dictionaries.
Press Submit to check your solution.
Back to lesson: Practice: LINQ workout