{"ScriptPreparationCode":null,"TestCases":[{"Name":"A","Code":"function isPalindrome(word) {\r\n word = word.toString().toLowerCase().replace(/[\\W_]/g, \u0027\u0027);\r\n \r\n const array_copy = word.split(\u0027\u0027);\r\n const reversed_array = array_copy.reverse();\r\n\r\n \r\n return word === reversed_array.join(\u0027\u0027);\r\n}\r\n\r\nfor(i=0; i\u003C1000; i\u002B\u002B){\r\n isPalindrome(\u0027omississimo\u0027);\r\n}","IsDeferred":false},{"Name":"B","Code":"function isPalindrome(word) {\r\n word = word.toString().toLowerCase().replace(/[\\W_]/g, \u0027\u0027);\r\n \r\n \r\n let left = 0;\r\n let right = word.length - 1;\r\n \r\n while(left \u003C right) {\r\n if (word[left] !== word[right]) {\r\n return false;\r\n }\r\n left\u002B\u002B;\r\n right--;\r\n }\r\n \r\n return true\r\n}\r\n\r\nfor(i=0; i\u003C1000; i\u002B\u002B){\r\n isPalindrome(\u0027omississimo\u0027);\r\n}","IsDeferred":false}]}