Faster Linear-Space Data Structures for Path Frequency Queries
Abstract
We present linear-space data structures for several frequency queries on trees, namely: path mode, path least frequent element, and path -minority queries. We present the first linear-space data structures, requiring preprocessing time, that can answer path mode and path least frequent element queries in time. This improves upon the best previously known bound of achieved by Durocher et al. in 2016. For the path -minority problem, where is specified at query time, we reduce the query time of the linear-space data structure of Durocher et al. from down to by employing a simple randomized algorithm with a success probability . We also present the first linear-space data structure supporting "Path Maximum -value Color" queries in time, requiring preprocessing time. This general framework encapsulates both path mode and path least frequent element queries. For our data structures, we consider the word-RAM model with , where is the word size in bits.
Cite
@article{arxiv.2604.18667,
title = {Faster Linear-Space Data Structures for Path Frequency Queries},
author = {Ovidiu Rata},
journal= {arXiv preprint arXiv:2604.18667},
year = {2026}
}