Ezvor

1660. Correct a Binary Tree

MediumHash Table Preparing judge… LeetCode
Hash TableTreeDepth-First SearchBreadth-First SearchBinary Tree

Hints

Hint 1
If you traverse the tree from right to left, the invalid node will point to a node that has already been visited.