• + 1 comment

    Cut each edge and check if the resulting subtree is even in length

    This line should be added in the description very clearly

    • + 0 comments

      To me it seems like such a solution would scale worse than the method using DFS traversal and checking the number of nodes in the subtree?