In sorted range selection problem, the aim is to preprocess a given array A[1: n] so as to answers queries of type: given two indices i,j ($1 \le i\le j \le n$) and an integer k, report k smallest elements in sorted order present in the sub-array A[i: j] Brodal et.al.[2] have shown that the problem can be solved in O(k) time after O(n log n) preprocessing in linear space. In this paper we discuss another tradeoff. We reduce preprocessing time to O(n), but query time is O(k log k), again using linear space. Our method is very simple.
翻译:在排序范围选择问题中,目标是预处理给定的阵列 A[1: n],以便回答类型查询:给两个指数i、j(1 \ le i\ le j\ le n$)和整数 k,报告A[ j] Brodal etal. 等次阵列中出现的按顺序排列的 k 最小元素。[2] 已经显示,在O(k) 时间后,在线性空间的 O(n log n) 预处理可以解决问题。在本文中,我们将讨论另一个取舍。我们把预处理时间缩短到 O(n),但查询时间是 O(k log k),使用线性空间。我们的方法非常简单。