(graph, source, target, seen)
| 28 | }; |
| 29 | |
| 30 | const dfs = (graph, source, target, seen) => { |
| 31 | for (const neighbor of graph[source]) { |
| 32 | if (hasRedundantConnection(graph, neighbor, target, seen)) return true; |
| 33 | } |
| 34 | |
| 35 | return false; |
| 36 | }; |
| 37 | |
| 38 | /** |
| 39 | * https://leetcode.com/problems/redundant-connection/ |
no test coverage detected