Is there a built-in method in boost to find the lowest common ancestor of two or more nodes in a tree (which is a boost::graph instance)?
If not, I would appreciate suggestions on the best way to do this. Wikipedia claims there are efficient algorithm to achieve this in O(1) time (with O(n) pre-processing), but it doesn’t describe the algorithms.
Found the algorithm in Wikipedia: