In
computer science
Computer science is the study of computation, information, and automation. Computer science spans Theoretical computer science, theoretical disciplines (such as algorithms, theory of computation, and information theory) to Applied science, ...
, the range query problem consists of efficiently answering several queries regarding a given interval of elements within an
array. For example, a common task, known as
range minimum query, is finding the smallest value inside a given range within a list of numbers.
Definition
Given a
function that accepts an array, a range query
on an array