Why don't we do it this way?

Why do we have to do only 1 task by ourselves and another task by recursion can’t we make all task done by recursion?
here in my code, I made all the tasks done by recursion only
just added a base case to let recursion know when to stop…

here all task is done by recursion

Recursion requires a base case to stop infinite calls; doing one task manually helps establish this termination point.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.