Binary Lifting Algorithm

I have run into 2 different problems that can be solved using binary lifting. Then there is second thread's tree basics youtube video that talks about this technique with some practice problems. So this blog collects problems that can be solved using this technique. I am not gonna dive into each problem in detail. Each problem already has a well explained editorial. 

[LeetCode 1483] Kth Ancestor of a Tree Node

[Codeforces Robots on a Grid]

Lowest Common Ancestor

Query to find the maximum and minimum weight between two nodes in a given tree using LCA

 

 

原文地址:https://www.cnblogs.com/lz87/p/13124210.html