Saturday, March 8, 2014
Third entry
Continuing from week 3 , we went deeper into recursion and learned all different kinds of recursion structure. Recursion is the act of calling itself inside the function, this helps us as a programmer to write code much more efficient and easier for others the understand. For example, if u want to find the sum of a list using the methods from beginning, we might have to find the sum of individual elements and store it at a place then add them up.However, by using a recursion method we can find all the sum for each element at once and it will shorten the code by a lot. My biggest problem for now, is to trace a given recursion and how to discover the base case for some kind of required method. I guess i just need to practice and see more kinds of recursion until i can manage it well.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment