LCA and Binary Lifting

Many algorithms, such as cycle detection, need us to be able to find the least common ancestor of two nodes. Here is a fast way to do that making use of a technique called binary lifting.

Slides