You are given a tree with n nodes, where node i has a non-negative value values[i], and the n-1 edges of the tree. You must remove exactly one edge, which splits the tree into two subtrees. Return the…
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.