What is an Algorithm? Why is it required in programming process ? Explain with an example.


It is a logical process of analyzing a mathematical problem and data step-by-step so as to make it easy for computing or for conversion of data into information for solving our problem. The method of solving a problem is known as an algorithm. More precisely, an algorithm is a sequence of instructions that act on some input data to produce some output in a finite number of steps.

For example: In our day-to day work, brain automatically performs the algorithm by experience but not in a systematic and error free way to give the root for our work to be going to do.

Algorithms are very important in computer Science. The best chosen algorithm makes sure computer will do the given task at best possible manner. In cases where efficiency matter a proper algorithm is really vital to be used. An algorithm is important in optimizing a computer program according to the available resources.  .

Ultimately when anyone decide to solve a problem through better algorithms then searching for  the best combination of program speed and least amount of memory consumption is desired.

An Algorithm for Addition of two numbers using sequence control

  1. Start
  2. Input the first number for addition and store it, consider to NUM1.
  3. Input the second number for addition and store it, consider to NUM2.
  4. Now process SUM = NUM1 + NUM2.
  5. Show the result of addition through SUM.
  6. End