anshrathod / Basic-Python-Scripts

Created For HacktoberFest.
GNU General Public License v2.0
27 stars 97 forks source link

ALL NODES IN A BINARY TREE WHICH ARE AT A K DISTANCE FROM A PARTICULA… #152

Closed DIVYAMPARHWAL closed 2 years ago

DIVYAMPARHWAL commented 2 years ago

…R NODE

You have to take a Binary Tree of type integer, a target node, and an integer value K from the user. Print the data of all nodes that have a distance K from the target node. The order in which they would be printed will not matter.