Graph Valid Tree

Try to solve the Graph Valid Tree problem.