From 8efa0efdb2c94174a9d53c4c29476207c23f202e Mon Sep 17 00:00:00 2001 From: Antti H S Laaksonen Date: Sat, 11 Feb 2017 21:38:13 +0200 Subject: [PATCH] Corrections --- luku27.tex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/luku27.tex b/luku27.tex index d422c0f..df69c16 100644 --- a/luku27.tex +++ b/luku27.tex @@ -402,14 +402,14 @@ there will be three steps: the left endpoint moves one step to the left, and the right endpoint moves two steps to the right. -After each step, we update the -array \texttt{c}. +After each step, the array \texttt{c} +needs to be updated. After adding an element $x$, we increase the value of $\texttt{c}[x]$ by one and if $\texttt{c}[x]=1$ after this, we also increase the answer to the query by one. -In a similar way, after removing an element $x$, +Similarly, after removing an element $x$, we decrease the value of $\texttt{c}[x]$ by one and if $\texttt{c}[x]=0$ after this,