0

RECURSION-TAIL RECURSION-DYNAMIC Algorithms

Does Recursion better that loop??? Someone says it will lead to the stackoverflowing. However, Tail Recursion with complicated Algorithm will not! What do you think about Recursion?Is it good or bad?

23rd Jun 2018, 8:02 AM
Jack Nguyễn Đức Anh
Jack Nguyễn Đức Anh - avatar
1 Answer
0
Recursion can be really useful in some cases like the fibonacci sequence, tower of hanoi and even quick sorting if done right. I was asked in my programming class to use recursion for login (just to practice) and for very big database systems I feel like a for loop would work better, because of the fact that it will use a lot less memory.
28th Jun 2018, 6:18 PM
Megan Venter
Megan Venter - avatar