LCA – Lowest Common Ancestor

Errichto Algorithms · 15:55 · Watch on YouTube

The video builds on binary lifting to find the lowest common ancestor (LCA) of two tree nodes in O(log n) time. First lift the deeper node so both are at the same depth. If they are now the same node, that node is the...

Read the full summary on retube

한국어