• + 2 comments

    I found some people are playing with the example input and come up with super short simple soultion. They play math with the value of the vertexes, and take adavatage of some rules in the examples. I feel that is not correct, though they were able to pass all tests.

    Here are some questions I think need to clarify:

    1. Is this a tree (has root) or a graph (no root)? I assume no root, or any node can be consdier as a root.

    2. Is this directed graph or underected? I assum underected.

    3. Are we supposed to remove any edge or just the edge connect to root? Since I assume no root, I assume we can remore any edge

    4. Is it guranteed the value of vertexes are 1,2,3,4,5..and sof forth? Some solutions on interet are simply doing calculation with these values. But I assume they can be any value, not even intergers. I assume using interger in the diagram is just for the sake of easy to read.

    Are my assumption correct?