From d1dc9063f39334433114fba0a7f4e56b40b129bd Mon Sep 17 00:00:00 2001 From: Antti H S Laaksonen Date: Wed, 15 Feb 2017 23:45:36 +0200 Subject: [PATCH] Corrections --- luku09.tex | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/luku09.tex b/luku09.tex index 70e4e77..9243ffc 100644 --- a/luku09.tex +++ b/luku09.tex @@ -75,8 +75,8 @@ We first focus on a situation where the array is \key{static}, i.e., the elements are never modified between the queries. In this case, it suffices to construct -a data structure that tells us -the answer for any possible query efficiently. +a static data structure that tells us +the answer for any possible query. \subsubsection{Sum queries} @@ -249,8 +249,8 @@ Note that minimum and maximum queries can always be processed using similar techniques, so it suffices to focus on minimum queries. -Let $\textrm{rmq}(a,b)$ denote the minimum element -in the range $[a,b]$. +Let $\textrm{rmq}(a,b)$ (''range minimum query'') +denote the minimum element in the range $[a,b]$. The idea is to precalculate all values of $\textrm{rmq}(a,b)$ where $b-a+1$, the length of the range, is a power of two. For example, for the array