Table of Contents

Lowest Common Ancestor (LCA) Computation

Finds the lowest common ancestor of two nodes in a tree using preprocessing and queries in O(log n) or better.

Category: tree
Loading...

Enjoy reading code with a tandem explainer?

Explain code with DocComment! Try out your own code!

Try DocComment