Binary Tree Distance K from Target Node
Prereq: BFS on Tree
Given a binary tree, an integer that represents the target node's value, and an integer K
, return a list of the values of all the nodes whose depth (level) is K
away from the target node's depth. Order of returned nodes does not matter.