Simple O(1) Query Algorithm for Level Ancestors

07/25/2022
by   Sanjeev Saxena, et al.
0

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

Please sign up or login with your details

Forgot password? Click here to reset