{"ScriptPreparationCode":"function getRandomInt(max) {\r\n return Math.floor(Math.random() * Math.floor(max));\r\n}\r\n\r\nvar arr = [];\r\nvar arr2 = [];\r\nfor(var i = 0; i \u003C 51; i\u002B\u002B){\r\n \tarr.push(getRandomInt(100));\r\n arr2.push(getRandomInt(100));\r\n}","TestCases":[{"Name":"lodash","Code":"_.intersection(arr,arr2);","IsDeferred":false},{"Name":"sort","Code":"var getArrayIntersection = (a, b) =\u003E {\r\n var setA = new Set(a),\r\n setB = new Set(b);\r\n\r\n var comparator = {\r\n array: setA,\r\n set: setB,\r\n };\r\n\r\n if (setA.size \u003E setB.size) {\r\n comparator.array = setB;\r\n comparator.set = setA;\r\n }\r\n\r\n const intersection = [...comparator.array].filter((el) =\u003E\r\n comparator.set.has(el),\r\n );\r\n\r\n return intersection;\r\n};\r\n \r\n getArrayIntersection(arr, arr2);","IsDeferred":false}]}