paper

Space-efficient Data Structure for Next/Previous Larger/Smaller Value Queries

arXiv:2209.00158 · doi:10.1007/s00453-025-01325-9

Abstract

Given an array of size from a total order, we consider the problem of constructing a data structure that supports various queries (range minimum/maximum queries with their variants and next/previous larger/smaller queries) efficiently. In the encoding model (i.e., the queries can be answered without the input array), we propose a -bit data structure, which supports all these queries in time, for any positive constant integer (here, , and for , ). The space of our data structure matches the current best upper bound of Tsur (Inf. Process. Lett., 2019), which does not support the queries efficiently. Also, we show that at least bits are necessary for answering all the queries. Our result is obtained by generalizing Gawrychowski and Nicholson's -bit lower bound (ICALP, 15) for answering range minimum and maximum queries on a permutation of size .

Fix minor issues in the tables of the journal version

Space-efficient Data Structure for Next/Previous Larger/Smaller Value Queries · wovepaper