Please anybody help to get why I am getting wrong answer in questionYour text to link here... my solution is Your text to link here... I am finding all connected components in the graph and assigning a color to it and the two nodes having same color print "YES" else print<<"NO"