Binary Lifting Search
Binary Lifting Search Binary lifting search finds a target ancestor, state, or boundary by jumping in powers of two. It is common on trees, functional graphs, and ordered implicit structures where repeated "next" or "parent" moves are needed. The method preprocesses jumps of length: $$ 1, 2, 4, 8, \dots $$ Then a query combines these jumps to move quickly. Problem Given a directed parent relation parent[v] , preprocess a...