mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-05 08:16:50 +08:00
@ -3,7 +3,7 @@
|
||||
* Binary Lifting implementation in Javascript
|
||||
* Binary Lifting is a technique that is used to find the kth ancestor of a node in a rooted tree with N nodes
|
||||
* The technique requires preprocessing the tree in O(N log N) using dynamic programming
|
||||
* The techniqe can answer Q queries about kth ancestor of any node in O(Q log N)
|
||||
* The technique can answer Q queries about kth ancestor of any node in O(Q log N)
|
||||
* It is faster than the naive algorithm that answers Q queries with complexity O(Q K)
|
||||
* It can be used to find Lowest Common Ancestor of two nodes in O(log N)
|
||||
* Tutorial on Binary Lifting: https://codeforces.com/blog/entry/100826
|
||||
|
Reference in New Issue
Block a user