To print all the nodes that are k distance from root, we can use recursive approach.The base cases are when the node becomes null or the k value becomes 0.We make a recursive call to both the left and right child, decrementing the k value.The recursion tree shows the process for k = 2.