
ALGORITHMS
An algorithm is a detailed sequence of actions to perform to
accomplish some task. The name comes from an Iranian mathematician
Al-Khawarizmi.
A more precise definition
– A finite set of step-by-step instructions for a problem-solving or
computation procedure, especially one that can be implemented by a
computer.
OR
- A mathematical procedure that can usually be explicitly encoded in a
set of computer language instructions that manipulate data.
However, the steps of an algorithm are not dependent on any specific
computer language.
It gives an idea of the logical steps used, without bothering about the
syntax of a language.
It helps us in checking if the solution process is correct and efficient,
even before it is run on a computer.
An algorithm can be coded in any computer language.
You might say that the algorithm can be described through a “pseudo
code“. Here are some examples of algorithms.
Finding minimum of 3 numbers:
1. Read the three numbers into a, b and c.