First Common Ancestor of a Binary Tree
问题 If I have a binary search tree like this then what will be lowest common ancestor of nodes 6 and 1? 回答1: According to the Wikipedia definition of the Lowest common ancestor I correct myself: The lowest common ancestor (LCA) is a concept in graph theory and computer science. Let T be a rooted tree with n nodes. 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 ). So