Class Solution
java.lang.Object
g1101_1200.s1192_critical_connections_in_a_network.Solution
1192 - Critical Connections in a Network.<p>Hard</p>
<p>There are <code>n</code> servers numbered from <code>0</code> to <code>n - 1</code> connected by undirected server-to-server <code>connections</code> forming a network where <code>connections[i] = [a<sub>i</sub>, b<sub>i</sub>]</code> represents a connection between servers <code>a<sub>i</sub></code> and <code>b<sub>i</sub></code>. Any server can reach other servers directly or indirectly through the network.</p>
<p>A <em>critical connection</em> is a connection that, if removed, will make some servers unable to reach some other server.</p>
<p>Return all critical connections in the network in any order.</p>
<p><strong>Example 1:</strong></p>
<p><img src="https://assets.leetcode.com/uploads/2019/09/03/1537_ex1_2.png" alt="" /></p>
<p><strong>Input:</strong> n = 4, connections = [[0,1],[1,2],[2,0],[1,3]]</p>
<p><strong>Output:</strong> <a href="1,3">1,3</a></p>
<p><strong>Explanation:</strong> <a href="3,1">3,1</a> is also accepted.</p>
<p><strong>Example 2:</strong></p>
<p><strong>Input:</strong> n = 2, connections = [[0,1]]</p>
<p><strong>Output:</strong> <a href="0,1">0,1</a></p>
<p><strong>Constraints:</strong></p>
<ul>
<li><code>2 <= n <= 10<sup>5</sup></code></li>
<li><code>n - 1 <= connections.length <= 10<sup>5</sup></code></li>
<li><code>0 <= a<sub>i</sub>, b<sub>i</sub> <= n - 1</code></li>
<li><code>a<sub>i</sub> != b<sub>i</sub></code></li>
<li>There are no repeated connections.</li>
</ul>
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Solution
public Solution()
-
-
Method Details
-
criticalConnections
-