in mathematics and computer science an algorithm l r m is an unambiguous specification of how to solve a class of problems algorithms can perform calculation data processing automated reasoning and other tasks as an effective method an algorithm can be expressed within a finite amount of space and time and in a well defined formal language for calculating a