Algorithms
An algorithm is a step-by-step procedure or step-by-step instructions for solving a problem or completing a task.
Characteristics of Good Algorithms
Section titled “Characteristics of Good Algorithms”- Input - Accepts zero or one or more inputs.
- Output - Produces at least one output.
- Finiteness - Terminates after a finite number of steps.
- Correctness - Produces the correct output for all valid inputs.
- Definiteness - Each step is clearly and unambiguously defined.
- Efficiency - Uses minimal time (time complexity) and space (space complexity).