estimate of the complexity in Listing~\ref{lst:improved}. The algorithm has a
complexity lies in the $\mathcal{O}(nm)$ because the main loop repeats at
maximum $n$ or $m$ times and the searching within the loop has a complexity of
-$n$ if the loop runs $m$ times and $m$ otherwise.
+$n$ if the loop runs $m$ times and $m$ otherwise. The polynomial growth allows
+the algorithm to be scaled relatively well.
\begin{lstlisting}[caption={Improved approach}, label={lst:improved},
- keywords={[3]while,create,put,return,find,remove}
-]
+ keywords={[3]while,create,put,return,find,remove}]
n - create list result of length n and initialize with -1
n+m - create list rows/columns that contain pairs of indices and sums of values
nlgn - sort the rows and columns list on ascending sum
c4 - return the results list
\end{lstlisting}
-\section{Conclusion}
-
\newpage
\section{Appendices}
\subsection{\textit{\href{http://www.java.com}{Java}} source}