Thursday, 12 February 2015

3: Recursion. meh, I guess.

So in the 5th week we focused on the idea of recursion and how to trace a function that uses recursion. The concept to me, seemed a bit complicated at the start but it made sense after the first trace. Recursion is rather simple from what I understand; it's like using a helper function in a function, but the helper function is the same function as the one you're writing.

Weird... right?

We had to trace a couple of recursion functions on the midterm and it's rather simple; it's as though you follow the function line by line, as if you're the computer reading the program. From what I've seen, several people found recursion to be an odd and abstract concept but I feel like it's a rather simple idea. I didn't think it was possible but now I'm wondering how I lived without it...

No comments:

Post a Comment