1660. Correct a Binary Tree
Description
**Input:** root = [1,2,3], fromNode = 2, toNode = 3
**Output:** [1,null,3]
**Explanation:** The node with value 2 is invalid, so remove it.ac
Last updated
**Input:** root = [1,2,3], fromNode = 2, toNode = 3
**Output:** [1,null,3]
**Explanation:** The node with value 2 is invalid, so remove it.Last updated
**Input:** root = [8,3,1,7,null,9,4,2,null,null,null,5,6], fromNode = 7, toNode = 4
**Output:** [8,3,1,null,null,9,4,null,null,5,6]
**Explanation:** The node with value 7 is invalid, so remove it and the node underneath it, node 2.