Hi! Welcome to the world of Recursion! Programs using Recursion can be made to do all sorts of things, right from calculating the factorial of a number, to playing complex games against human intelligence. This small tutorial I've put up for you will take you from the basics of Recursion all the way to the highly challenging problems, giving you a firm understanding and confidence in Recursive programming. Most of the examples in this tutorial are some well known games, such as tic-tac-toe, and are therefore a fun way to get started with programming using recursion.
There are two sections in this site. The first is the actual Tutorial, with each chapter progressing on certain topics. The second section is for those who are already comfortable with Recursion. It consists of a mix of several specific problems solved.
A step by step introduction to programming in Recursion. Please don't skip any of the chapters, since you may not be able to understand some of the chapters without reading the previous ones first.
| The basic definition of Recursion
along with a kick start
into its philosophy with the Factorial function
|Solve the famous paper-pencil
Magic Squares using recursive functions.
[An insight into the permutation abilities of Recursion.]
|Make your program defeat you
in the world-famous game of tic-tac-toe.
[Watch Recursion work in 2-player games.]
|Enter the realm of programming
complex games like Connect-4 using Recursion.
[Depth-limit algorithms. The limitations of Recursion.]
|Make your Recursive functions
10 times faster. Optimize
using a simple technique called Alpha-Beta Pruning.
Also learn about Recursion Trees.
Here are some other interesting programs or problems involving Recursion. You could try to solve these problems yourself, or you could simply go through the solutions I've provided. I add new problems to this section whenever I think of something new.
(Magic squares, Tic tac toe and Connect-4 have been discussed thoroughly in the Tutorial section above. Don't miss it.)
|Three sorting algorithms which
using Recursive techniques:
Quick Sort, Merge Sort and Heapify.
Given a few digits, insert mathematical symbols
|Solve these intellectually challenging
involving Recursive solutions.
The finest way to lose a week's sleep..
For more information, try the following sites:
For additional help in any way concerning Recursion, or
for suggestions or complaints or doubts,