ordered sequence of instructions .
2. Each step of the algorithm should be unambiguous—that is, it should not have many meanings.
3. It should have a
finite number of steps .
4. It should
terminate/stop after this finite number of steps.
5. It should have
some input and may or may not produce any
output .
Algorithms should be concise and compact to facilitate verification of their correctness.
Verification involves observing the performance of an algorithm with a good quality set of test cases.
For example, we might want to write an algorithm to find the maximum from a set of n positive
numbers. We assume that the numbers are stored in an array X.