+ 13
Which is best
Recursion or iteration
10 Antworten
+ 6
never use recursion in interview if you know iterative code, recursion increases space and time complexity in most of the situations
+ 8
Jenis Gadhiya reason?
+ 6
Iteration is a much better option...
+ 6
Obviously the execution of iteration is much faster than recursion.. Bcoz during recursion stack is made and during the execution of iteration no such structure is made.. Which speedens the execution of the program..
+ 5
That means
+ 5
Okkkk sir😅
+ 4
Overall recursion is best?
+ 4
I think it's depends about what's the way that the code will be write, both of them have some advantages, but I prefer iteration because I'm not understand well functional programming yet, soon I will
+ 2
It all depend upon situation.
But prefer to use recursion
+ 1
Depends on the problem, you can solve something only with recursion and not with iteration.