arXiv · 1903.01387
A Simple Solution to the Level-Ancestor Problem
Abstract
A Level Ancestory query LA($u$, $d$) asks for the the ancestor of the node $u$ at a depth $d$. We present a simple solution, which pre-processes the tree in $O(n)$ time with $O(n)$ extra space, and answers the queries in $O(\log\ {n})$ time. Though other optimal algorithms exist, this is a simple enough solution that could be taught and implemented easily.
Explore related subjects
Keep this discovery
Explore connections, maps & timelines
Gaurav Menghani, Dhruv Matani. 2019-03-04. A Simple Solution to the Level-Ancestor Problem. https://arxiv.org/abs/1903.01387
Cite the original work for its findings. Save a collection to share your selection of sources.