Binary Lifting

Keywords: lowest common ancestor (LCA), k-th ancestor