Flatten a tree with an Euler tour and the lowest common ancestor of two nodes is the shallowest entry between their two positions, turning an ancestry question into a range minimum over a static array. KACTL, the contest library from KTH, does precisely that: LCA.h walks the tree once to build the Euler array, hands it to the sparse table in RMQ.h, and every later ancestor query is one comparison. That is the shape the structure wants, a tree fixed before the first query and queried far more often than it has nodes. The same doubling shows up without the Euler tour as binary lifting, where up[k][v] is the 2^k-th ancestor of v and row k is built from row k - 1 the way this table is, giving O(log n) queries instead of O(1) but answering k-th ancestor directly.