Lowest Common Ancestor
Everything on SkillVeris tagged Lowest Common Ancestor — collected across the glossary, study notes, blog, and cheat sheets.
2 resources across 1 library
Interview Questions(2)
What is the Lowest Common Ancestor (LCA) Problem?
The lowest common ancestor problem asks for the deepest node in a tree that has both of two given nodes as descendants, and it is typically solved in O(n) with…
What is a Cartesian Tree and What Is It Used For?
A Cartesian tree is a binary tree built from a sequence of values where an in-order traversal recovers the original sequence order, and simultaneously the tree…