- An algorithm is a sequence or set of instructions for solving a problem.
- Set of rules to be followed in solving a problem.
- An algorithm is a step-by-step procedure which defines a set of instruction to be executed in a certain order to get the desired output.
- An algorithm can perform calculation, data processing, and automated reasoning task
- An algorithm can be implemented in more than on language.
Important Categories of Algorithm
- Search: Algorithm to search an item.
- Sort: Algorithm to search item in a certain order.
- Insert: Algorithm to insert an item in a data structure.
- Update: Algorithm to update an existing item.
- Delete: Algorithm to delete an existing item.
Characteristics of an Algorithm
INPUT: An algorithm should have zero or better define the number of inputs.
FEASIBILITY: Algorithm should be feasible with the available resources.
INDEPENDENT: An algorithm should have step-by-step directions which should be independent of any programming codes.
UNAMBIGUOUS: Algorithm should be clear and unambiguous i.e for each step and their input/output should be clear and must lead to only one meaning.
FINITENESS: Algorithm must be terminated after a finite number of steps.
Important Problem Types
- String Processing
- Graph Problems
- Geometric Problems
- Numerical Problems