Interview Questions

Find common ancestor in tree

Each node in the tree has a pointer to parent and pointers to all children nodes. On input you received two nodes from the tree and your algorithm has to return closest common node between these two nodes.

View Solution
comments powered by Disqus