English

Range Medians

Data Structures and Algorithms 2008-07-02 v1 Other Computer Science

Abstract

We study a generalization of the classical median finding problem to batched query case: given an array of unsorted nn items and kk (not necessarily disjoint) intervals in the array, the goal is to determine the median in {\em each} of the intervals in the array. We give an algorithm that uses O(nlogn+klogklogn)O(n\log n + k\log k \log n) comparisons and show a lower bound of Ω(nlogk)\Omega(n\log k) comparisons for this problem. This is optimal for k=O(n/logn)k=O(n/\log n).

Keywords

Cite

@article{arxiv.0807.0222,
  title  = {Range Medians},
  author = {Sariel Har-Peled and S. Muthukrishnan},
  journal= {arXiv preprint arXiv:0807.0222},
  year   = {2008}
}

Comments

To appear in ESA 08

R2 v1 2026-06-21T10:56:32.560Z