{"ScriptPreparationCode":"function hashCode1(str){\r\n var hash = 0;\r\n if (str.length == 0) return hash;\r\n for (i = 0; i \u003C str.length; i\u002B\u002B) {\r\n char = str.charCodeAt(i);\r\n hash = ((hash\u003C\u003C5)-hash)\u002Bchar;\r\n hash = hash \u0026 hash; // Convert to 32bit integer\r\n }\r\n return hash;\r\n}\r\n\r\nfunction hashCode2(str) {\r\n var hash = 0, i, chr;\r\n if (str.length === 0) return hash;\r\n for (i = 0; i \u003C str.length; i\u002B\u002B) {\r\n chr = str.charCodeAt(i);\r\n hash = ((hash \u003C\u003C 5) - hash) \u002B chr;\r\n hash |= 0; // Convert to 32bit integer\r\n }\r\n return hash;\r\n};\r\n\r\nfunction hashCode3(str) {\r\n var hash = 5381,\r\n i = str.length;\r\n\r\n while(i) {\r\n hash = (hash * 33) ^ str.charCodeAt(--i);\r\n }\r\n return hash \u003E\u003E\u003E 0;\r\n}","TestCases":[{"Name":"hashCode1","Code":"hashCode1(\u0027qwerty\u0027)","IsDeferred":false},{"Name":"hashCode2","Code":"hashCode2(\u0027qwerty\u0027)","IsDeferred":false},{"Name":"hashCode3","Code":"hashCode3(\u0027qwerty\u0027)","IsDeferred":false}]}