One line elegant C# solution


  • 0
    W
    return words
            .Where(c => Regex.IsMatch(c.ToLower, @"[qwertyuiop]+|[asdfghkl]+|[zxcvbnm]+"))
            .ToArray();
    

    Not accepted by the editor though...


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.