After practicing recursions, I
found that all recursions must have a base case, which, personally, is the most
important, yet difficult in writing a recursive function. However, once you
have figured out the base case of the problem, recursion becomes real easy
because a recursive function is basically a function that calls itself. I found a great website that contains a brief explanation, as
well as some examples of recursions. This website (http://www.openbookproject.net/thinkcs/python/english2e/ch11.html),
along with the other posted readings from the course website, helped me fully
understand the concept behind writing recursive functions. However, I plan to continue practice in writing recursive functions (although recursions should be
avoided when programming) so that I would not forget how a recursions works.
Friday, February 28, 2014
Week 7: Recursion
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment