Meta Interview Question

Given a binary tree, find shortest path from given node to nearest leaf (not including itself). Possibly traverse backwards up the tree.

Interview Answer

Anonymous

Apr 9, 2019

I used bfs but there’s a better solution that idk