[Tex/LaTex] Missing $ inserted. on a math algorithm

algorithm2ealgorithms

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 forstatement closes. How can I fix it? Thanks in advance.

Best Answer

How 1010011010 user said, you must use $\leftarrow$ instead of \leftarrow.

Related Question