Graph Theory37 sections · 1633 units
Open in Course

Intro

(The goal)

In this section, I'll teach you binary lifting, a technique that answers ancestor queries in trees in logarithmic time instead of linear time. You will learn how to preprocess a tree so you can jump up kk steps from any node in O(logk)O(\log k) time.

This technique is the foundation for fast LCA algorithms and many other tree problems. By the end, you will be able to answer millions of ancestor queries efficiently, something impossible with naive traversal.

1770083170077-iz5d8gb5fri.jpg