An algorithm is defined as “step by step procedure to solve a given problem infinite number of steps”.
Characteristics of algorithm:
Every step should perform a single task
There should not be any confusion at any stage.
It must involve a finite number of steps.