What is an algorithm? What are the characteristics of a good algorithm?
An algorithm is defined as “a step-by-step procedure of accomplishing some task'''' An algorithm may be shown many ways. For i.e., it may be written down in English or French, or any other ''''natural'''' language. Thus, we are interested in algorithms that have been precisely specified using an appropriate math formalism--like as a programming language.
Each algorithm should have five characteristics:
A. Input: The algorithm must take zero or more input.
B. Output: The algorithm may produce one or more outputs.
C. Definiteness: Each step of algorithm must be defined unambiguously.
D. Effectiveness: A human should be able to calculate the exact values involved in the procedure of the algorithm using paper & pencil.
E. Termination: An algorithm may terminate after a finite number of steps.