Critical Connections in a Network

Hard · Graphs · about 35 minutes

Asked at Amazon, Google, Microsoft, Meta, Bloomberg.

n servers 0..n-1 are connected by undirected connections, forming a connected network. A critical connection is one whose removal disconnects some servers. Return all critical connections, in any order (each as [a, b] in either order).

Related guides