Graph Theory37 sections · 1633 units
Open in Course

Extensions

(Beyond basic LCA)

You can extend LCA to answer more complex queries: kth ancestor (jump to the ancestor kk steps above uu), path median (find the middle node on a path), and heavy-light decomposition for path updates. With binary lifting, the kth ancestor is a binary representation query: jump uu upward by the powers of two in kk's binary form.

These extensions turn LCA from a simple query into a toolkit for tree algorithms.