Unit 4 Flashcards
algorithm
An algorithm is a finite set of instructions that, if followed accomplish a particular task; a series of steps to accomplish a task. All algorithms must have: an input, output, clarity, finiteness and effectiveness
Input
An algorithm may accept zero or more inputs
Output
An algorithm should produce some result
Clarity
Each step in an algorithm should be a clear and unambiguous
finiteness
An algorithm should end after a finite number of steps; an algorithm cannot repeat forever(otherwise it doesn’t solve a problem).
effectiveness
It should be possible for a person or a computer to fulfill each step in an algorithm and the algorithm should accomplish the given task.
nomial case
a “normal” or typical input to an application
edge case
An input that is set at the extreme of the allowable range of inputs.
problem solving steps
- Understand the problem
- Explore examples
- Break down the problem
- Solve or reduce the problem
- Simplify/Refactor