LEONARDO DRS Hiring | Online Assessment Interview Question | On-Campus(2023)
Question · Posted Jun 2026
Problem: Number of Operations to Make Network Connected Problem Statement There are n computers numbered from 0 to n-1 connected by cables. The array connections contains pairs [a, b] indicating a direct cable between computers a and b. In one operation, you can remove an existing cable between two directly connected computers and reconnect it between any two disconnected computers. Return the minimum number of operations required to connect all computers into a single network. If it is impossible, return ...
The full answer & interview discussion are available to premium members.
Log in Create a free account