练习离散数学

Binary Lifting

Browse Binary Lifting lessons inside Algorithmic Thinking and Complexity.

1 lessons · 5 questions

Algorithmic Thinking and Complexity

Big-O, loop analysis, graph algorithms, invariants, and developer-focused discrete math.

1 lessons · 410 questions

Binary Lifting

1 lessons · 5 questions

Least You Need to Know: Binary Lifting, Power-of-Two Jumps, and Ancestor Queries

Binary lifting preprocesses jump pointers so ancestor movement can be decomposed into **powers of two**. The main trick is the same as binary representation: any jump length can be written as a sum of power-of-two jumps.

打开课程