A tree without parent link, how to find out the path from a specific node to root
Use DFS (depth first search) to traverse the tree until the node is reached, ordering of the nodes in the stack is what we want.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment