A Simple Solution to the Level-Ancestor Problem
Data Structures and Algorithms
2021-11-09 v2
Abstract
A Level Ancestory query LA(, ) asks for the the ancestor of the node at a depth . We present a simple solution, which pre-processes the tree in time with extra space, and answers the queries in time. Though other optimal algorithms exist, this is a simple enough solution that could be taught and implemented easily.
Cite
@article{arxiv.1903.01387,
title = {A Simple Solution to the Level-Ancestor Problem},
author = {Gaurav Menghani and Dhruv Matani},
journal= {arXiv preprint arXiv:1903.01387},
year = {2021}
}