Company: capital one IITK
Difficulty: medium
Virus Containment in a Lab Problem Description A high-security lab contains N rooms connected by M secure tunnels. A deadly virus has been released in one of the rooms, and the lab's containment system is attempting to isolate it as quickly as possible. To contain the outbreak, the lab must determine whether all other rooms can be completely isolated from the infected room S by sealing tunnels strategically. A room is considered isolated if there is no direct or indirect path to the infected room S. Each tunnel is bidirectional and can be sealed individually, meaning that once sealed, no movement is possible through it. Your task is to determine the minimum number of tunnels that must be sealed to fully isolate all other rooms from the infected room S. If it is impossible to isolate the infected room, return -1. You must implement the function minTunnelsToSeal . Parameters: int N : Number of rooms. int M : Number of tunnels. int S : Room where the virus started. List<int[]> tunne