This commit is contained in:
Laaksonen Antti H S 2017-07-08 19:48:37 +03:00
parent e2d5a9d693
commit 6d4d3ca2e5
3 changed files with 3 additions and 3 deletions

BIN
book.pdf

Binary file not shown.

View File

@ -457,8 +457,8 @@ After this change, the time complexity is $O(n^2)$.
Surprisingly, it is possible to solve the problem
in $O(n)$ time\footnote{In \cite{ben86}, this linear-time algorithm
is attributed to J. B. Kadene, and the algorithm is sometimes
called \index{Kadene's algorithm} \key{Kadene's algorithm}.}, which means
is attributed to J. B. Kadane, and the algorithm is sometimes
called \index{Kadane's algorithm} \key{Kadane's algorithm}.}, which means
that just one loop is enough.
The idea is to calculate, for each array position,
the maximum sum of a subarray that ends at that position.

View File

@ -28,6 +28,6 @@ You can always send feedback on the book to
\texttt{ahslaaks@cs.helsinki.fi}.
\begin{flushright}
Helsinki, June 2017 \\
Helsinki, July 2017 \\
Antti Laaksonen
\end{flushright}