Sponsored
Use these hints if you're stuck. Try solving on your own first.
As long as there are at least (n - 1) connections, there is definitely a way to connect all computers.
Use DFS to determine the number of isolated computer clusters.
Solve with full IDE support and test cases