In order that the algorithms do not take you this way as that of the image, I hope that this point of view on the definition of an algorithm helps you.

An algorithm is:
" A logical related structure Stepwise with validation for That fulfills a requirement ".