InterviewSolution
| 1. |
Explain the characteristics of an algorithm? |
|
Answer» 1. Input – Zero or more quantities to be supplied. 2. Output – At least one quantity is produced. 3. Finiteness – Algorithms must terminate after finite number of steps. 4. Definiteness – All operations should be well defined. For example operations involving division by zero or taking square root for negative number are unacceptable. 5. Effectiveness – Every instruction must be carried out effectively. 6. Correctness – The algorithms should be error free. 7. Simplicity – Easy to implement. 8. Unambiguous – Algorithm should be clear and unambiguous. Each of its steps and their inputs/outputs should be clear and must lead to only one meaning. 9. Feasibility – Should be feasible with the available resources. 10. Portable – An algorithm should be generic, independent of any programming language or an operating system able to handle all range of inputs. 11. Independent – An algorithm should have stepby-step directions, which should be independent of any programming code. |
|