Results 1 to 1 of 1
- 02-13-2013, 10:57 PM #1
Member
- Join Date
- Oct 2012
- Location
- Tempe, Arizona
- Posts
- 77
- Blog Entries
- 12
- Rep Power
- 0
Recursion to Iteration, and Vice Versa
Can ANY loop be translated into a recursive method? And can ANY recursive method be translated into a loop? Is there any scenario where one wouldn't be able to handle what the other can?
Several of us were talking about recursion vs iteration, and this topic came up. I was not able to remember anytime that one couldn't be replaced with the other, yet it seems like there must be a scenario where this is true. Can anyone think of a scenario where this would be true? I know one might be a lot more sloppier than the other, usually loops in my mind, but it seems like both could handle any problem... Am I wrong in thinking this?
Most sources I viewed on the Internet say that either could handle any problem, yet I remain unconvinced for some odd reason...Catching exceptions is for communists
Similar Threads
-
Need to write a driver TCP IP to RS232 and vice versa
By besil in forum New To JavaReplies: 2Last Post: 07-10-2011, 03:07 PM -
Retrieving all the keys corresponding to a value and vice versa
By Ms.Ranjan in forum New To JavaReplies: 5Last Post: 04-16-2009, 06:30 PM -
Postfix into prefix and vice versa
By sfe23 in forum New To JavaReplies: 9Last Post: 02-19-2009, 10:37 PM -
Converting to ASCII and vice-versa
By pheonix in forum New To JavaReplies: 2Last Post: 09-09-2008, 04:43 AM -
Document conversion PDF to MS doc and vice versa
By abintoms in forum New To JavaReplies: 1Last Post: 08-08-2007, 12:45 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks