Thanks for the replies. I knew recursion was more resource intensive, but I could not think of any significance between the two.
lazloman
@lazloman
0
Reputation
2
Posts
25
Profile views
0
Followers
0
Following
Best posts made by lazloman
This user hasn't posted anything yet.
Latest posts made by lazloman
-
RE: Can recursive loops be replaced with a conventional loop?
-
Can recursive loops be replaced with a conventional loop?
We were having a discussion in the office and someone asks why use recursion. He thinks you can replace recursion with a convetional loop, like a 'for' loop. I could not give him an answer. I think I should be able to give an intelligent answer, but I can't. So help me out. I know recursion can be expensive and my require a larger stack, but what are the benefits of one type of loop over the other, (if any)?
Thanks