we have given rooted tree , and target node and some other node A, we have to check if target node present in simple path from root to A , please tell me how to check this in o(1)
finding the target node present in path of tree
we have given rooted tree , and target node and some other node A, we have to check if target node present in simple path from root to A , please tell me how to check this in o(1)