{"ScriptPreparationCode":"var a = [],\r\n b = [],\r\n c = [],\r\n d = [],\r\n i;\r\nfor (i = 0; i \u003C 1000; i\u002B\u002B) {\r\n a.push(Math.floor(Math.random() * 1000) \u002B 1);\r\n b.push(Math.floor(Math.random() * 1000) \u002B 1);\r\n \tc.push(Math.floor(Math.random() * 1000) \u002B 1);\r\n \td.push(Math.floor(Math.random() * 1000) \u002B 1);\r\n}\r\n\r\n","TestCases":[{"Name":"Lodash","Code":"_.intersection(a,b,c,d);","IsDeferred":false},{"Name":"CustomObjectBased","Code":"var intersection = (function(){\r\n return function(){\r\n var len = arguments.length;\r\n \tvar here = [...arguments];\r\n let hashObject = {};\r\n \tlet returnarr=[];\r\n for(var i=0;i\u003Clen;i\u002B\u002B){\r\n if(!i)\r\n here[i].forEach(num =\u003E hashObject[num] = i);\r\n else{\r\n here[i].forEach(num=\u003E{\r\n if(hashObject.hasOwnProperty(num) \u0026\u0026 hashObject[num] === i-1){\r\n hashObject[num]=i;\r\n \tif(i===len-1)\r\n\t \treturnarr.push(parseInt(num))\r\n }\r\n })\r\n }\r\n }\r\n return returnarr;\r\n }\r\n}());\r\n\r\nintersection(a,b,c,d);","IsDeferred":false}]}