742. Closest Leaf in a Binary Tree
TreeDepth-First SearchBreadth-First SearchBinary Tree
Hints
Hint 1
Convert the tree to a general graph, and do a breadth-first search. Alternatively, find the closest leaf for every node on the path from root to target.
Preparing judge…