Algorithm can define in various meaning depend on the view of function.
For example:
Generally -- An algorithm is a finite step-by-step procedure to achieve
a required result.
Programming -- An algorithm is a sequence of computational steps
that transform the input into the output.