As I was told, recursion is a good way to make things simple in terms of writing programming code, but the outcome usually involves extra overheads. I was also told that for some recursion algorithms it is possible to adapt them to make corresponding nonrecursion ones. I wonder if there's a generic way to do that. And if so, are there any literatures regarding that matter that you would like to recommend? Thank you very much in advance!!
punchinello
0
Light Poster
Recommended Answers
Jump to PostOfcourse there are generic ways to make a recursive method non-recursive. Just google for it. U wil get that.
Regarding the use of recursive functions: It is not recommended always because it may lead to stack-overflow and crash of your program if the iterations are large in numbers.
But …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.