JavaScript - Faster than 100%. O(n) time and O(1) space.
\n/**\n * Time complexity = O(n), where n is the length of both s and t\n * Space complexity = O(26) = O(1)\n * @param {string} s\n * @param {string} t\n * @ret
```\n/**\n * Time complexity = O(n), where n is the length of both s and t\n * Space complexity = O(26) = O(1)\n * @param {string} s\n * @param {string} t\n * @return {boolean}\n */\nvar isAnagram = function(s, t) {\n    if(s.length != t.length) {\n        return false;\n    }\n    \n    let freq = new Array(26).fill(0);\n\n    for(let i = 0; i < s.length; i++) {\n        freq[s.charAt(i).charCodeAt(0) - \'a\'.charCodeAt(0)]++;\n        freq[t.charAt(i).charCodeAt(0) - \'a\'.charCodeAt(0)]--;\n    }\n    \n    return freq.every(index => index === 0);\n};\n```
['JavaScript']