1 line JavaScript solution


  • 0
    Z
    /**
     * @param {string} s
     * @param {string} t
     * @return {boolean}
     */
    var isAnagram = function(s, t) {
        return  s.split('').sort().join('') == t.split('').sort().join('') ? true : false;
    };
    

Log in to reply
 

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