Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
A.Rashad said:what are the disadvantages of recursive functions ?
Recursion - Wikipedia, the free encyclopediaThe main disadvantage is often that the algorithm may require large amounts of memory if the depth of the recursion is very large.
Recursion - Wikipedia, the free encyclopedia
This could be stack or heap space (it depends what it is used in the recursive function). Also there is the possibility to fall into an infinite loop if you call it in a wrong way, which will lead to stack or heap overflow. Finally, it could sometimes be difficult for someone to understand and analyse the code.
Having the same name doesn't mean that they share the same address as well. Otherwise recursive functions could not work.A.Rashad said:Does In recursive functions push and pop operations onto stack happens ? I am confused that , fucnction calls itself , so all the current variables are same in called function , so why to store them on stack ?