Sunday 2 March 2014

Week 7: Recursion

Recursion, by definition, is a function that calls itself.  A recursive function is usually composed of a base case, the recursive step, and the actual work. Recursion simplifies the problem by dividing it into the same but smaller versions of the problem, and you just need to do a tiny bit of work and than repeat the same thing again and again to solve the problem. Thus recursion is the key to many important and complex algorithms.

No comments:

Post a Comment