Binary Lifting & Lowest Common Ancestor (LCA)
Precompute `2^k` ancestor jumps to answer k-th ancestor and LCA queries in O(log n).
This lesson has not been built yet.
Related problems 0
No related practice problems are linked yet.
Precompute `2^k` ancestor jumps to answer k-th ancestor and LCA queries in O(log n).
This lesson has not been built yet.
No related practice problems are linked yet.