We use a stack instead, it’s not terribly different from the recursion but it saves function calls which use a lot more stack than needed.
We use a stack instead, it’s not terribly different from the recursion but it saves function calls which use a lot more stack than needed.