Iterative
|
Recursive
|
|
In iteration, a problem is converted into a train of steps that are
finished one at a time, one after another
|
Recursion is like piling all of those steps on top of each other and
then quashing them all into the solution.
|
|
With iteration, each step clearly leads onto the next
|
In recursion, each step replicates itself at a smaller scale, so that
all of them combined together eventually solve the problem
|
|
Any iterative problem is solved recursively
|
Not all recursive problem can solved by iteration
|
| does not use Stack |
It uses Stack |