Sponsored
Use these hints if you're stuck. Try solving on your own first.
Use the DFS to reconstruct the tree such that no leaf node is equal to the target. If the leaf node is equal to the target, return an empty object instead.
Solve with full IDE support and test cases