Wednesday, March 4, 2015
Tracing Recursion --- to be graded
Recursion is something I have never touched before, it is mind-blowing in a sense that it allows us to execute an arbitrary amount(i.e. just the right amount ) of commands according to the problem. Instead of tackling one specific case of the problem, recursion serves as a generic formula, whose power lies in the possibility of defining an infinite amount of objects with only a finite number of lines of codes. It is particularly mighty in a way that it automatically adjusts the amount of code needed to solve the problem. Human intelligence is embodied by the infinity achieved by 'finity'.
Tracing is already confusing enough, yet it is only a piece of cake compare to actually writing your own recursion. It all started after the introduction of tree ; not only we have to tackle with the confusing enough tree structure, but also its entanglement with recursion. At the beginning, I was more or less 'trying' to make the recursion work by keeping typing some random code similar to the example, instead of actually having the whole idea of knowing how to do this in my head.
Well, "No pain No gain", "Pain is temporary, GPA is forever", although recursion really is really hurting my brain, but these are extremely good mental working out which will definitely benefit me in other aspects of life. Logic, persistence and resilience are the ever-lasting virtues, triumph will always belong to human's mind.
Subscribe to:
Comments (Atom)