Answer to Question #153307 in Programming & Computer Science for Ariel

Question #153307

State 2 similarities and one difference between recursion and iteration


1
Expert's answer
2021-01-25T13:34:04-0500

similarities

recursion and iteration are similar un such a way that both are based on a control structure: recursion has a selection structure; Iteration has a repetition structure

both are similar: they involve repetition: repetition is achieved in recursion through repeated method calls; Iteration uses a repetition structure explicitly.

difference

iteration occurs when we execute a loop repeatedly until a certain condition is met. Recursion is a method call in which the called method is similar to making the call.


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS