What is an algorithm? What are the characteristics of a good algorithm?
An algorithm is "a step-by-step process for accomplishing some task'' An algorithm can be given in many ways. For example, it can be written down in English (or French, or any other ''natural'' language). Though, we are interested in algorithms which have been precisely specified using an appropriate mathematical formalism--like as a programming language.
Each algorithm should have the following three characteristics:
1. Input: The algorithm should take zero or more input.
2. Output: The algorithm should produce one or more outputs.
3. Definiteness: Each and every step of algorithm should be described unambiguously.