Algorithm means step-by-step problem solving. That is, to break a problem into several steps and solve each step in turn to solve the entire problem.
The word Algorithm is derived from the name of Al Kharizomi, an Arab mathematician. He explains the term algorithm in his mathematics book as follows:
An algorithm is a special procedure for solving a particular problem.Al Kharizomi
In other words, Algorithm is a logical step-by-step process for solving a problem by computer. That is, an algorithm is a sequential recording of the steps from the beginning to the end of program writing and execution. Algorithms play a very important role in programming to solve any problem with the help of computer.
Rules for writing Algorithm
- The algorithm will be straightforward.
- Each step should be clear so that it is easy to understand.
- The problem must be solved in a finite number of steps.
- The algorithm must be widely applicable.
Benefits of Algorithm
- Easily understand the purpose of the program.
- Easily diagnose program errors.
- Program flow is understood.
- Complex programs can be easily written.
- Assists in program modification and enhancement.