1

While reading Code Complete second edition, I came across this line:

You can do anything with stacks and iteration that you can do with recursion.

Is this true? or there are functions, that must be implemented recursively, and can't be done otherwise ?

Bite Bytes
  • 259
  • 1
  • 7

1 Answers1

1

Your CPU uses stacks and iteration to run any program, including programs based on recursion.

If you are unsure how this works, I suggest picking up an appropriate textbook.

Yuval Filmus
  • 280,205
  • 27
  • 317
  • 514