Problem
Suppose each node v of a binary tree T is labeled with its value p(v) in a level numbering of T. Design a fast method for determining p(u) for the lowest common ancestor (LCA), u, of two nodes v and w in T, given p(v) and p(w). You do not need to find node u, just compute its level-numbering label.