Sunday, February 8, 2015

Week 4: Recursion

    Ah yes, recursion, an absolutely fascinating tool that is used in programming for the sole purpose of drawing trees. So what is recursion? Let me just look that up...


Wait, I swear I spelled that correctly. Why would Google say "Did you mean: recursion?" Oh I get it. Real funny Google, but there goes 20 minutes of my life trying to figure out what was wrong.

    As Wikipedia has said, recursion in computer science is a method where the solution to a problem depends on solutions to smaller instances of the same problem. In CSC148 we would be given a recursive function, which generally involves using the function itself within the function definition to produce a result. We would be given a function, an input, and be asked to trace the result. As expected, there were function calls within function calls within function calls within function calls... And it really hurt my brain. Luckily, the whole point of computers is to compute things that we don't have to, so I can just let my computer's processor take the brunt of the calculations. 

No comments:

Post a Comment