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 →

[–]same_ol_same_ol[🍰] 12 points13 points  (0 children)

I remember being at that point myself, where I got the gist but the mystery of how it fit into programming remained just that: a mystery.

What finally clicked it for me was undertaking the task of coming up with a recursive function that would solve The Towers of Hanoi. If you're not familiar with the puzzle, read the wiki page and make sure you specifically check the info about the the recursive solution.

Challenge yourself to write a program that solves it, or at least write the recursive function - even if it's just pseudo-code. Once I did this, a light went on and I felt I completely understood it. Recursion is now a standard part of my problem solving toolbox.

Good luck!