Leetcode – 863. All Nodes Distance K In Binary Tree

When I first saw this problem, I panicked! I knew that this some how had to be a Breadth First Search problem because BFS from any node gives you the shortest path to every other node that is connected to the tree. Since every node is represented as a TreeNode with only left and right pointers, I would need to …

Mohit AthwaniLeetcode – 863. All Nodes Distance K In Binary Tree