Simple  BFS solution and also Burning Tree Solution in Python
for Burning Tree return Value of C\nif target node not given and only value given \nadd  1 condition in 1st BFS  Traversal\nif n.val==target.val:\ntarget=n\n\np
for Burning Tree return Value of C\nif target node not given and only value given \nadd  1 condition in 1st BFS  Traversal\nif n.val==target.val:\ntarget=n\n```\nparents = {root: None}\n        q = [root]\n        while q:\n            n = q.pop()\n            if n.left:\n                parents[n.left] = n\n                q.append(n.left)\n            if n.right:\n                parents[n.right] = n\n                q.append(n.right)\n                \n        q = [(target, 0)]\n        used = set()\n        used.add(target)\n        c=0\n        r = []\n        while q:\n            l=len(q)\n            for i in range(l):\n                n, i = q.pop(0)\n                if i == K:\n                    r.append(n.val)\n                if n.left and n.left not in used:\n                    q.append((n.left, i + 1))\n                    used.add(n.left)\n                if n.right and n.right not in used:\n                    q.append((n.right, i + 1))\n                    used.add(n.right)\n                if parents[n] and parents[n] not in used:\n                    q.append((parents[n], i + 1))\n                    used.add(parents[n])\n            c+=1\n        print(c-1)                \n        return r\n```
[]