Two Sigma Interview Question

Construct tree from given array. Write a method for removing a subtree, given the root of the subtree.