DEV Community

Discussion on: Solving a Job Application Code Challenge

Collapse
 
s3artis profile image
Matt Weingaertner

The problem with fast shooting, is always the same, mistakes! :/

static void Main(string[] args) {
    var keyString = new string(longString
        .OrderByDescending(x => longString.Count(c => c.Equals(x)))
        .Distinct()               
        .ToArray());             
    Console.WriteLine(keyString.Split('_')[0]); 
}