arXiv Open Access 2019

A Simple Solution to the Level-Ancestor Problem

Gaurav Menghani Dhruv Matani
Lihat Sumber

Abstrak

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.

Topik & Kata Kunci

Penulis (2)

G

Gaurav Menghani

D

Dhruv Matani

Format Sitasi

Menghani, G., Matani, D. (2019). A Simple Solution to the Level-Ancestor Problem. https://arxiv.org/abs/1903.01387

Akses Cepat

Lihat di Sumber
Informasi Jurnal
Tahun Terbit
2019
Bahasa
en
Sumber Database
arXiv
Akses
Open Access ✓