memr5 / Algorithms

Various Algorithms
MIT License
26 stars 162 forks source link

Lowest common ancestor #150

Closed 48cfu closed 4 years ago

48cfu commented 5 years ago

The function lca returns a pointer to the lowest common ancestor node of the two values given.

Reference: https://www.hackerrank.com/challenges/binary-search-tree-lowest-common-ancestor/problem