Sollicitatievraag bij Yahoo

Find LCA in binary tree.

Antwoord op sollicitatievraag

Anoniem

5 sep 2011

Important note: If the question was about BST (Binary search tree) - then it's one solution , if it's about generic Binary-Tree , then it's another solution. BST: http://discuss.joelonsoftware.com/default.asp?interview.11.355962.5 Binary Tree: http://techpuzzl.wordpress.com/2010/01/26/lca-of-two-nodes-in-a-binary-tree/