Ask your own question, for FREE!
Computer Science 11 Online
OpenStudy (anonymous):

difference between recursion and iteration

OpenStudy (anonymous):

A recursive function works through the process of calling itself until a condition is met. An iteration uses a looping control structure (while, do while, for) to repeat a section of code until a condition is met. This is the simple difference between them :)

OpenStudy (anonymous):

It's worth pointing out that theoretically they are equivalent. There is a way to convert iterative code to recursive, and vice versa. In industry, many companies disallow the use of recursion because of the danger of stack overflow crashes. The structure of the problem will dictate which way of solving it is easier.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Latest Questions
Arriyanalol: i need help
19 hours ago 7 Replies 1 Medal
Arriyanalol: CONGRATS to me
22 hours ago 8 Replies 2 Medals
Legomaster346: What colleges are good that are near Arab Alabama?
1 week ago 5 Replies 0 Medals
Arriyanalol: i need help
1 week ago 6 Replies 2 Medals
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!