Properties of an Algorithm

Algorithm: An algorithm is a set of steps to solve a particular problem.

1. Input: An algorithm should have some inputs.

2. Output: At least one output should be returned by the algorithm after the completion of the specific task based on the given inputs.

3. Definiteness: Every statement of the algorithm should be clear and unambiguous.

4. Finiteness: No infinite loop should be allowed in an algorithm.
Example:

while(1<2)
{
 number=number/2;
}

5. Effectiveness: Writing an algorithm is a priori process of actual implementation of the algorithm. So, a person should analyze the algorithm in the finite amount of time with a pen and paper to judge the performance for giving the final version of the algorithm.