2014年3月20日星期四

Week 7

Week 7
One of the most important topics in csc148 is about recursion. But sometimes recursion is very hard to track. But I think I have some good ways to understand and to track the recursion process.
One way is to trace the function calls and I learned this in Lab04, where we are asked to trace some functions, greatest common denominator and binary representation. The process helped me lot understand recursive functions. I think it is easy for people to have an ambiguous idea about recursion without tracing it. If you traced it, you will see it’s just a repetitive process of calling the same function until it satisfies some condition and then stops.

My advice about learning and understanding the recursion is to work step by step. The recursion is not so hard if you have a clear thought about what the functions does and what the base case is.

没有评论:

发表评论