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