Recent Post

Algorithms in Data Structure

             An algorithm is a method or process followed to solve a problem.
             Algorithms are created independent of understanding language,i.e an algorithm can be implemented in more than one programming language.

Properties of algorithm :-
  • It must be correct.
  • It is composed of a series of concrete steps.
  • There can be no ambiguity asto which step will be performed next.
  • Must be composed of finite number of steps.
  • It must terminate.

Algorithm to add two number,
  1. Read a
  2. Read b
  3. c=a+b
  4. display c 
                   This is implemented by a C , C++ , Java Language etc.
A computer program can be seen as an instance or concrete representation of an algorithm , in some programming language.
 A problem is a function or a mapping of inputs to outputs
An algorithm is a recipe for a solving a problem whose steps are concrete and unambiguous.
The algorithm must be correct of finite length and must terminate all inputs.A program  is an instantiate of an algorithm in a computer programming language.

No comments