This is my pseudo algorithm:
\begin{algorithm}[t]
\caption{Generate Disseminated Sequences}\label{euclid}
\begin{algorithmic}[1]
\Function{output}{$memory,input$}
\State $\text{initialize}~ B \gets \text{all zeros}$
\For{$i = 1$ to ${sizeIn}$\text{+1}}
\State $\text{return}~OUTPUT\gets \text{convert \textit{B} to decimal }$
\For{$j = memorySize$ to $2$}
\State $M[j+1] \gets M[j]$
\EndFor
\State $B[i] \gets inputString[i]$
\EndFor
\EndFunction
\end{algorithmic}
\end{algorithm}
My issue is
- I am not getting end For when I run it.
- I want to reduce the space that it takes but when I put
\vspaceafter\end{algorithmic}or\end{algorithm}my last line come out of those algorithm space.

noendor using\algtext*anywhere? Seealgpseudocodewithout end block text. – Werner Jun 29 '17 at 19:36