Delete the node whose value is key from a binary search tree and return the root of the resulting tree.
- A leaf is simply removed; a node with one child is replaced by that child
- A node with two children takes the value of its in-order successor (the smallest value in its right subtree), and then that successor is removed from the right subtree. Following this rule exactly makes the resulting shape unique
- If
key is not in the tree, return the tree unchanged - The root can change, so use the return value
- Values are distinct.
build and toArray are provided