tree connected graph cycle a leaf tree vertex connect exactly vertexyou give tree n vertex root vertex 1 there ant leaf tree in second ant simultaneously parent vertex vertex no ant vertex simultaneously root treefind minimal time require ant root tree note start ant leave tree