{"ScriptPreparationCode":null,"TestCases":[{"Name":"with methods","Code":"function doer (s,t) {\r\n return [...s].sort().join(\u0022\u0022) == t\r\n}\r\n\r\n\r\ndoer(\u0022alireza\u0022 , \u0022arlizae\u0022)","IsDeferred":false},{"Name":"without methods","Code":"let isAnagram = function(s, t) {\r\n if (s.length !== t.length) {\r\n return false;\r\n }\r\n \r\n let freq = new Array(26).fill(0);\r\n for (let i = 0; i \u003C s.length; i\u002B\u002B) {\r\n freq[s.charCodeAt(i) - \u0027a\u0027.charCodeAt(0)]\u002B\u002B;\r\n freq[t.charCodeAt(i) - \u0027a\u0027.charCodeAt(0)]--;\r\n }\r\n \r\n for (let i = 0; i \u003C freq.length; i\u002B\u002B) {\r\n if (freq[i] !== 0) {\r\n return false;\r\n }\r\n }\r\n \r\n return true;\r\n};\r\n\r\n\r\nisAnagram(\u0022alireza\u0022 , \u0022arlizae\u0022)","IsDeferred":false}]}