2014年2月23日星期日

Recursion

In previous week, we learned about Recursion.  Recursion is a Python function that calls itself until it reaches a specific case. Otherwise, the function would raise a error or even run forever. It is a very smart and concise method that breaks a large problem into several pieces of smaller problems which can be solved in the same way. Then, these smaller problems are solved in order to solve the larger one. Imagine how efficient the program will be and how much time it will save if we apply Recursion to a program which needs a large number of repeating calculation.

It was not that hard to understand its concept, however, when I tried to apply it to real computer programming, I realized it is not enough just understanding its concept. I need to think much more logically, in other words, it is necessary to think just like a computer. In the end, I hope that I can use this smart method 
proficiently after some excises.