Thursday, 26 February 2015

My Thoughts On Recursion


My Thoughts On Recursion

               Tracing recursion has been really interesting to say the least. Essentially compacting a method like that will be very beneficial. Being able to replace having to use all those for loops to get a simple task done makes this a life saver! Of course I can't say grasping the concept has been easy. The fact that we'll have to trace recursive methods on our test is what's worrying me the most out of all the concepts we've learned. However, all these new concepts we've been learning and will learn are what really make this class interesting. I'll just have to put the effort in to get the concept down but in the end it'll be worth it. From my current understanding, we define what a base case returns and by doing so the recursive part of the method always starts with the inner base case of the input. From there it works its way further out of the input until it can no longer do so. At this point it returns the answer. The whole concept I find to be really clever!

No comments:

Post a Comment