Sum of nodes within K distance from target
Given a binary tree, a target node and a positive integer K on it, the task is to find the sum of all nodes within distance K from the target node (including the value of the target node in the sum). Examples: Input: target = 9, K = 1, Binary Tree = 1 / \ 2 9 / / \ 4 5 7 / \ / \ 8 19 20 11 / / \ 30