82ms JavaScript one-line Solution with Regex


  • 0
    S
    var findWords = function(words) {
        return words.filter(e => !(/[^asdfghjkl]/i.test(e) && /[^qwertyuiop]/i.test(e) && /[^zxcvbnm]/i.test(e)));
    };
    

Log in to reply
 

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