![Trie in DSA](https://coderzpy.com/wp-content/uploads/2023/04/download.png)
Trees: Lowest Common Ancestor
What is the Lowest Common Ancestor? In a tree, the lowest common ancestor (LCA) of two nodes, n1 and n2, is the shared ancestor located farthest from the root and has both n1 and n2 as descendants. Properties of the Lowest Common Ancestor: An LCA can be one of the input nodes themselves if one […]