Purely anecdotal information here, but one time I wrote a recursive function, and it was slow. I rewrote the function using a while loop, and it was fast. ![]()
So, perhaps your real issue here is using recursion.
Purely anecdotal information here, but one time I wrote a recursive function, and it was slow. I rewrote the function using a while loop, and it was fast. ![]()
So, perhaps your real issue here is using recursion.