{"ScriptPreparationCode":null,"TestCases":[{"Name":"reduce with shallow copy","Code":"const vertices = new Array(100).fill(0).map((_, i) =\u003E i);\r\nvertices.reduce((list, vertex) =\u003E ({ ...list, [vertex]: new Set() }), {});","IsDeferred":false},{"Name":"reduce without shallow copy","Code":"const vertices = new Array(100).fill(0).map((_, i) =\u003E i);\r\nvertices.reduce((list, vertex) =\u003E { \r\n list[vertex] = new Set(); \r\n return list; \r\n }, {});","IsDeferred":false},{"Name":"foreach","Code":"const vertices = new Array(100).fill(0).map((_, i) =\u003E i);\r\nlet adjacencyList = {}; \r\nvertices.forEach(vertex =\u003E {\r\n adjacencyList[vertex] = new Set();\r\n });","IsDeferred":false}]}