Question

What are the differences between infinite iteration/ infinite recursion.

What are the differences between infinite iteration/ infinite recursion.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

First Difference of Recursion and Iteration

Recursion repeatedly invokes the mechanism, and consequently the overhead, of method calls. This can be expensive in both processor time and memory space while iteration doesn’t.

So Infinite recursion can lead to system crash because variables created during recursion are stored on stack and The infinite recursion can caused to stack overflow , and infinite iteration doesn’t require a stack to store the memory, But infinite iteration can consume the CPU cycle.

Please let me know if you have any doubt or modify the answer, Thanks:)

Add a comment
Know the answer?
Add Answer to:
What are the differences between infinite iteration/ infinite recursion.
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT