• Welcome to TalkativeTurtles - a community for developers & tech enthusiasts.
  • Share projects, get code reviewed, and talk tech without the noise.
  • New here? Introduce yourself in the Introductions forum!
Hello There, Guest! Login Register


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Title: What made you finally get recursion?
Threaded Mode
#1
Recursion is one of those concepts where you can understand the definition but still not really get it until something clicks.

For me it was tree traversal. Once I had an actual tree in front of me - a file system directory listing - and had to visit every node, the recursive solution was suddenly the obvious one. Not the clever one. The obvious one.

Before that I was mentally unrolling the stack every time I saw a recursive function, which made it feel complex. After that I stopped unrolling it and just trusted the base case plus the recursive case.

Was there a specific problem or explanation that made it click for you? Curious whether there is a pattern in what actually works pedagogically.
Reply
  


Forum Jump:


Browsing: 1 Guest(s)