{"ScriptPreparationCode":"Array.prototype.shuffle = function() {\r\n let m = this.length, i;\r\n while (m) {\r\n i = (Math.random() * m--) \u003E\u003E\u003E 0;\r\n [this[m], this[i]] = [this[i], this[m]]\r\n }\r\n return this;\r\n};\r\n\r\nvar watched = [];\r\nfor(let i = 0; i \u003C 100000; i\u002B\u002B){watched.push({programId:Math.random()});}\r\n\r\nvar ignored = [...watched];\r\nignored.shuffle();\r\nignored = ignored.slice(50000, 51000);\r\n","TestCases":[{"Name":"a","Code":"watched.filter(wObj =\u003E {\r\n return !ignored.some((iObj, ndx) =\u003E {\r\n return iObj.programId === wObj.programId;\r\n });\r\n});","IsDeferred":false},{"Name":"b","Code":"watched.filter(wObj =\u003E\r\n !ignored.some((iObj, ndx) =\u003E {\r\n if (iObj.programId === wObj.programId) {\r\n ignored[ndx].programId = ignored.pop().programId;\r\n return true;\r\n }\r\n return false;\r\n })\r\n);","IsDeferred":false},{"Name":"c","Code":"var iset = new Set(ignored.flatMap(obj =\u003E obj.parentId));\r\nwatched.filter(wObj =\u003E !iset.has(wObj.parentId));\r\n","IsDeferred":false}]}