I've made the following pseudocode:
\documentclass[]{article}
\usepackage[]{algorithm2e}
\begin{document}
\title{Title}
\author{Author}
\date{Today}
\maketitle
\begin{algorithm}[H]
pseudoalgoritmo GRASP(maxIt, seed)\;
\For{k = 1, ..., itmax }{
solucion \leftarrow faseConstructiva(seed):\;
solucion \leftarrow busquedaLocal(solucion);\;
ActualizarSolucion (solucion, mejorSolucion)\;
}
return mejorSolucion\;
\caption{Pseudoalgoritmo GRASP}
\end{algorithm}
\end{document}
And I'm getting the Missing $ inserted. <inserted text>
error at the line where the for
statement closes. How can I fix it? Thanks in advance.
Best Answer
How 1010011010 user said, you must use
$\leftarrow$
instead of\leftarrow
.