(tickets, graph = new Map())
| 34 | }; |
| 35 | |
| 36 | const buildGraph = (tickets, graph = new Map()) => { |
| 37 | for (const [src, dst] of tickets) { |
| 38 | const edges = graph.get(src) || []; |
| 39 | |
| 40 | edges.push(dst); |
| 41 | graph.set(src, edges); |
| 42 | } |
| 43 | |
| 44 | return graph; |
| 45 | }; |
no test coverage detected