State the difference - Recursion vs iteration performance in java
Recursion vs iteration performance JavaScript does not perform tail recursion optimization, so if your recursion is too deep, you may get a call stack overflow. Iteration doesn't have such issues. If you think you are going to recurse too much, and you really need recursion (for example, to do flood-fill), replace the…
Answered Oct 13, 2022 · 1.1K Views Read answer →