I think that the problem description should be tweaked.
It says that
''two computers are interconnected if they are directly connected or if they are interconnected with the same computer".
Code: Select all
c 1 2
c 2 3
c 3 4
c 4 5
c 5 6
c 6 7
q 1 7 - true, according to the program grader