What is a Programming Algorithm?
So, what is a programming algorithm? You can think
of a programming algorithm as a recipe that describes
the exact steps needed for the computer to solve a
problem or reach a goal. We've all seen food recipes -
they list the ingredients needed and a set of steps for
how to make the described meal. Well, an algorithm is
just like that. In computer lingo, the word for a recipe
is a procedure, and the ingredients are called inputs.
Your computer looks at your procedure, follows it to
the letter, and you get to see the results, which are
called outputs. A programming algorithm describes
how to do something, and your computer will do it
exactly that way every time. Well, it will once you
convert your algorithm into a language it understands!
However, it's important to note that a programming
algorithm is not computer code. It's written in simple
English (or whatever the programmer speaks). It
doesn't beat around the bush--it has a start, a middle,
and an end. In fact, you will probably label the first
step 'start' and the last step 'end.' It includes only what
you need to carry out the task. It does not include
anything unclear, often called ambiguous in computer
lingo, that someone reading it might wonder about.
It always leads to a solution and tries to be the most
efficient solution we can think up. It's often a good
idea to number the steps, but you don't have to.
Instead of numbered steps, some folks use
indentation and write in pseudocode, which is a semiprogramming language used to describe the steps in an algorithm. But, we won't use that here since
simplicity is the main thing.
Adapted from: http://study.com/academy/lesson/what-is-an-algorithm-in-programming-definition-examples-analysis.html. Acesso em 28 de fevereiro de 2019.
Segundo o texto, a implementação de algoritmos
pode ser comparada a: