Given a binary tree, find shortest path from given node to nearest leaf (not including itself). Possibly traverse backwards up the tree.
Anonymous
I used bfs but there’s a better solution that idk
Check out your Company Bowl for anonymous work chats.