Algorithms Flashcards
1
Q
What is algorithm
A
An algorithm is an ordered set of unambiguous, executable steps that defines a terminating process
2
Q
Polya’s Steps in the Context of Program Development
A
- Understand the problem.
- Get an idea of how an algorithmic function might solve the problem.
- Formulate the algorithm and represent it as a program.
- Evaluate the solution for accuracy and its potential as a tool for solving other problems.
3
Q
Components of repetitive control
A
İnitialize: Establish an initial stat that will be modified towards the terminating condition.
Test:Compare current state to the terminating condition and terminate condition if equal.
Modify: Change the state in such way that it moves towards terminating condition.
4
Q
Recursion
A
The execution of a procedure leads to another execution of the procedure.
Multiple activations of the procedure are formed, all but one of which are waiting for other activations to complete.