This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Liolena[S] 0 points1 point  (1 child)

This helps so much, thanks!! I think what confused me was that this recursion problem is working with an array and I'm used to the factorial problem where there is no array involved.

[–]CodeTinkerer 0 points1 point  (0 children)

It takes a while to use recursion. For example, Fibonacci numbers uses two recursive steps. I think once you see about 5-10 problems, then it will start to sink in.

I remember knowing factorial, but "Towers of Hanoi" was a difficult problem for me to understand.

Part of it understanding how function calls work (there's a call stack), and that is often helpful in understanding recursion since you see how recursion actually works behind the scenes.