Algorithm
An algorithm is a step-by-step procedure, which defines a set of instructions to be executed in a certain order to get the desired output. An algorithm can be implemented in more than one programming language.
Characteristics of Algorithm
- Unambiguous(spasht in Hindi)-Each of its steps (or phases), and their inputs/outputs should be clear and must lead to only one meaning.
- Input- An algorithm should have 0 or more well-defined inputs.
- Output- An algorithm should have 1 or more well-defined outputs and should match the desired output.
- Finiteness − Algorithms must terminate after a finite number of steps.
- Feasibility − Should be feasible with the available resources.
- Independent − An algorithm should have step-by-step directions, which should be independent of any programming code.
Algorithm Analysis:-
- A Priori Analysis- This is a theoretical analysis of an algorithm.
- A Posterior Analysis- This is an empirical analysis of an algorithm. The selected algorithm is implemented using a programming language.
---------------------------------------------------------------------------------------
Comments
Post a Comment