There are n servers numbered 0 to n - 1 and a list of two-way cables [a, b]. A cable is critical if removing it leaves some servers unable to reach each other that could reach each other before. Write criticalConnections(n, connections) returning every critical cable as a pair [a, b], in any order and either way round.
- The network may be disconnected
- Two parallel cables between the same pair are never critical, because the other one still carries the link
- Self-loop cables are never critical
- Target: O(n + cables). A single line of 20000 servers must work, so recursion may overflow