Wednesday 2 April 2014

Weel 7: Recursion

Recursion is a method in computer science in which a function calls itself in order to solve a problem. This contrasts the method which we have most often used to far which is iteration. While iteration does steps over a certain amount of time, recursion will keep calling the function itself until it hits the "base case". Although it's a somewhat complicated, recursion appears to be extremely useful as it can write some iterative codes in much less lines or in some cases, there are problems in which only recursion can solve.

No comments:

Post a Comment