Red Hat Hiring Off Campus OA 2021 | Critical Connections in a Network | Tarjan's Algorithm (Bridges)
Question · Posted Jun 2026
Problem Statement You are given n servers numbered from 0 to n - 1 connected by a set of bidirectional network connections. Each connection is represented as: [u, v] indicating a direct connection between server u and server v. A critical connection (also known as a bridge) is a connection that, if removed, causes some servers to become unreachable from others. Your task is to find all such critical connections in the network. Return a list containing all critical connections. ...
The full answer & interview discussion are available to premium members.
Log in Create a free account