Well, if you're asking... It's curious you did not use the ever-present factorial example. The example provided does not really demonstrate the advantage of recursion. I'd use an example that would otherwise require a stack data structure, like an algo to detect palindromes, for example.
Yeah that's because the goal of writing this article was to clarify the main idea of recursion for absolute beginners, I wanted to make it as simple as possible so I came up with this simple example, maybe in an upcoming article I'll dive more deep into recursion
Thanks for your opinion
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Well, if you're asking... It's curious you did not use the ever-present factorial example. The example provided does not really demonstrate the advantage of recursion. I'd use an example that would otherwise require a stack data structure, like an algo to detect palindromes, for example.
Yeah that's because the goal of writing this article was to clarify the main idea of recursion for absolute beginners, I wanted to make it as simple as possible so I came up with this simple example, maybe in an upcoming article I'll dive more deep into recursion
Thanks for your opinion