# What is Algorithm

The algorithm well defines step by step process to solve any problem. The algorithm works as the basic fundamental of the program.

Similarly, the algorithm helps in performing a task in programming to obtain the expected output.

## Standard Definition's of Algorithm

Some standard variations of the algorithm are -:

An algorithm is a process or a set of rules that are specifically required by a computer to perform calculations or some other problem-solving task. algorithm has a finite set of instructions that are carried out in a specific order to perform specific tasks.

A finite set of instructions that specify a sequence of operations to solve a particular problem has to be completed or the class of problems is called an algorithm.

The term algorithm means "a process or set of rules to be followed in calculation or other problem-solving tasks". Therefore the algorithm refers to a set of rules / instructions that define, step by step, how a task is to be executed to achieve the expected result.

The algorithm designed is language-independent, i.e. they are only direct instructions that can be implemented in any language, and even then the output will be the same, as expected.

## Dataflow of an Algorithm

1. Problem: A problem can be any example from a real-world problem or a real-world problem that requires us to create a program or set of instructions. The set of instructions in sequence is known as an algorithm.
2. Algorithm: An algorithm will be designed for a problem that is a step by step process.
3. Processing unit: The input will be given to the processing unit, and the processing unit will manufacture the desired output.
4. Output: The output is the result or outcome of the program.

## Necessary Conditions for Algorithm Nomenclature

• Capital letters is required to be used for naming any algorithm.
• We cannot use the latter except for space or other symbols or underscores (-). So if we want to separate different functions then we can use any underscore symbol (-).

## Need of Algorithm

1. for understanding the basic idea's of the problem.
2. To find an approach to solve the problem.
3. To improve the efficiency of existing techniques.
4. for understanding the basic principles of designing algorithms.
5. Comparing the performance of the algorithm with respect to other techniques.
6. This is the best method of description without describing the implementation details.
7. The algorithm gives the designer a clear description of the problem's requirements and goals.
8. For a good design.
9. To understand the flow of the problem.
10. To measure the performance of a methods in all cases means that best case, worst case, average case.
11. To identify the resources (such as memory, input-output) cycles needed by the algorithm.
12. With the help of algorithms we transform art into a science.
13. To understand the principle of designing.

## Importance of Algorithms

• Theoretical importance : When a real-world problem is given to us and we break the problem down into small modules. To break down the problem, we must know all the theoretical aspects.
• Practical importance : So, importance of an algorithm can be agreed as both theoretical and practical.

## Advantages of Algorithms

• It is easy to understand.
• An algorithm is a step-wise representation of the solution to a given problem..
• The algorithm is broken into small pieces or steps, That's why, it is easy for the programmer to convert this into a real program.

## Disadvantages of Algorithms

• It takes a long time to write an algorithm so it is time consuming.
• It is difficult to show branching and looping statements in algorithms.