DEV Community

Discussion on: When Recursion Comes to Rescue

Collapse
 
pentacular profile image
pentacular

l think you are confusing a couple of fundamental things.

  • Iteration is generally recursive.

  • Recursion does not require function calls.

  • Implementing backtracking via a task list doesn't make something less recursive.

I think you may be conflating recursion with function calls.

Also I suggest considering the cost of all of those linear searches you're doing, as the number of tasks increases.