Stack Exchange network consists of 180 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
How can I insert this kind of pseudo code in latex?
The algorithm2e package has a vlined option wich does exactly what you need (you can also call \SetAlgoVLined at the beginning of each algorithm environment). Read the documentation to learn how to use the package.
See also the relevant chapter of the LaTeX WikiBook.
Required, but never shown