An algorithm is a well-defined procedure that allows a computer to solve a problem.
Characteristics of an algorithm are :-
- Unambiguous : Algorithm should be clear and unambiguous. Each of its steps should be clear.
- Input : An algorithm should have 0 or more well-defined inputs.
- Output : A algorithms should have 1 or more well-defined outputs and should match the desired output.
- Independent : A algorithms should have step-by-step directions which should be independent of any programing code.