Lowest Common Ancestor - O(logN) | Binary Lifting
Автор: Fluent Algorithms
Загружено: 2020-04-11
Просмотров: 11315
In this video I will be discussing on how to find the lowest common ancestor (lca) of 2 nodes in O(logn) time using a technique known as binary lifting. It is very useful in competitive programming and one must definitely know this technique. (eg : it becomes very easy to calculate the distance between two nodes in a tree).
Code - https://pastebin.com/984x2WPK
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: