I have a doubt in calculating LCA.   While calculating LCA of two
nodes, should those two nodes can also be ancestor. As wikipedia
states that
"The lowest common ancestor is defined between two nodes v and w as
the lowest node in T that has both v and w as descendants (where we
allow a node to be a descendant of itself)."

But usually we dont consider the nodes itself to be ancestor ?

Which approach should be followed ?

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to