Sometimes a problem is too difficult or too complex to solve because it is too big. If the problem can be broken down into smaller versions of itself, we may be able to find a way to solve one of these smaller versions and then be able to build up to a solution to the entire problem. Stated more concisely, a recursive definition is defined in terms of itself. Recursion is a computer programming technique involving the use of a procedure , subroutine , function , or algorithm that calls itself in a step having a termination condition so that successive repetitions are processed up to the critical step where the condition is met at which time the rest of each repetition is processed from the last one called to the first. Don't worry about the details of that definition.
Recursion turns out to be a wonderful technique for dealing with many interesting problems.
Solutions written recursively are often simple. Recursive solutions are also often much easier to conceive of and code than their iterative counterparts. In general, problems that are defined in terms of themselves are good candidates for recursive techniques. The standard example used by many computer science textbooks is the factorial function. Take a good close look at the above, and you may notice something interesting.