I am using algpseudocode to write pseudo code. I am noticed that the pseudo code is justify aligned, which doesn't look good here. Below is the snippet of latex code-
\usepackage{algorithm}
\usepackage[noend]{algpseudocode}
\begin{algorithm}
\caption{Generate Random Slides}
\label{algo:slide_generator}
\begin{algorithmic}[1]
\Procedure{SlideGenerator}{}
\State Let ${array\_temp}$ is a new list of length $\gets {array\_alph}.Length$
\State Let ${array\_slides}$ is a new list of length $\gets {array\_alph}.Length$
\For{$i = 0 \to \textit{array\_alph}.Length$}
\State $first\_char\_per\_slide \gets getUniqueChar(array\_temp)$
\Comment Get unique character from ${array\_alph}$ which is not present in ${array\_temp}$
\State $unique\_alph.Add(first\_char\_per\_slide)$
\While{$used\_alph.Length < items\_per\_slide$}
\State $unique\_alph.Add(getUniqueChar(unique\_alph))$
\Comment Get unique character from $unique\_alph$ and add it to $unique\_alph$
\EndWhile
\EndFor
\State $array\_slides [i] \gets current\_slide(unique\_alph)$
\State $array\_temp.Add(first\_char\_per\_slide)$\\
\Return $array\_slides$
\EndProcedure
\end{algorithmic}
\end{algorithm}
Below is the screenshot of generated pdf-

I have following two questions-
- How to correct the alignment?
- Since the pseudo code is not looking better, How to modify the content of it?
I have the above code in C# But somehow I am not able to write a proper pseudo code. The above pseudo code uses System.Collections.Generic.List
algorithmicx-package when a line is broken. – Werner Sep 25 '14 at 17:22array_tempis a List here. Also should I replace following in line 10? addfirst_char_per_slidetoarray_temp– ravi Sep 26 '14 at 04:27\smallso that worked :) . As per your suggestion, I should ask the second question in Code Review – ravi Sep 26 '14 at 06:24