Simple O(1) Query Algorithm for Level Ancestors
This note describes a very simple O(1) query time algorithm for finding level ancestors. This is basically a serial (re)-implementation of the parallel algorithm. Earlier, Menghani and Matani described another simple algorithm; however, their algorithm takes O(log n) time to answer queries. Although the basic algorithm has preprocessing time of O(nlogn), by having additional levels, the preprocessing time can be reduced to almost linear or linear.
READ FULL TEXT