Algorithm is a step-by-step procedure which is used to solve a problem. It is important Computer Science and Software Engineering. We can improve our program efficiency in cost and time by choosing appropriate algorithm and data structures for a particular program.
An algorithm is a sequence of computational steps that transform the input into the output.
Definition of algorithm :
“An algorithm is a well-defined computational procedure, which takes some value (or set of values) as input and produces some value, or a set of values, as output”.
Characteristic or features of an algorithm :
According to Knuth [Knuth:1997:ACP:260999], an algorithm must satisfy five features or characteristics:
- Finiteness, means it must always terminate after a finite number of steps.
- Definiteness, means each step must be precisely defined and clear.
- Input, means it has zero or more inputs, i.e., an algorithm can run without taking any input.
- Output, means it has one or more outputs, i.e., an algorithm must produce atleast one output.
- Effectiveness, means it is also generally expected to be effective.
An algorithm should be and unambiguous and independent of any programming code, i.e., language independent.
You can also watch this video by Abdul Bari, he has explained about these characteristics of an algorithm.
Please write comments below if you find anything incorrect, or you want to share more information about the topic discussed above. A gentle request to share this topic on your social media profile.