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

9 Apr 2019

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