Corrections

This commit is contained in:
Antti H S Laaksonen 2017-02-11 21:38:13 +02:00
parent 32659fe3d2
commit 8efa0efdb2
1 changed files with 3 additions and 3 deletions

View File

@ -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,