I have a task in hand and there are two options.
Option 1 : Do this task in a simple way
Option 2: Write a method and call in recursively.
Both are producing the required results. My question is, does recursion causes performance issues?
I always thought that recursion does take up a little bit more memory because it has to keep track of all the pointers. Other than that, I would think that it has the same performance.
So the bottom line is, recursion takes more memory.