words.Where(x => x.Length == 3).GroupBy(x => x).OrderByDescending(x => x.Count()).Take(10).ToArray()pattern btw?Array.Resize() when you have reached capacity, that's basically what List does internally anyway.MatchPattern function?return false early if any char doesnt match, so you dont have to do this count business.Dictionary<string,int> to keep track of word counts but if thats off the table...words.Where(x => x.Length == 3).GroupBy(x => x).OrderByDescending(x => x.Count()).Take(10).ToArray()patternArray.Resize()MatchPatternreturn falseDictionary<string,int>