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,