My code passed all testcases for connected graph


#1

I think the test cases should include disconnected forests for better problem solving.