It seems that 2 has 2 parents. If we remove [1, 3], the graph is still not a valid tree.
After remove [1, 3]:
After remove [4, 2]
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.