English

Range Quantile Queries: Another Virtue of Wavelet Trees

Data Structures and Algorithms 2015-05-13 v6

Abstract

We show how to use a balanced wavelet tree as a data structure that stores a list of numbers and supports efficient {\em range quantile queries}. A range quantile query takes a rank and the endpoints of a sublist and returns the number with that rank in that sublist. For example, if the rank is half the sublist's length, then the query returns the sublist's median. We also show how these queries can be used to support space-efficient {\em coloured range reporting} and {\em document listing}.

Cite

@article{arxiv.0903.4726,
  title  = {Range Quantile Queries: Another Virtue of Wavelet Trees},
  author = {Travis Gagie and Simon J. Puglisi and Andrew Turpin},
  journal= {arXiv preprint arXiv:0903.4726},
  year   = {2015}
}

Comments

Added note about generalization to any constant number of dimensions.

R2 v1 2026-06-21T12:45:07.673Z