Exercises in Recursion

Hi,
I am having problems thinking in recursive terms for solving a problem? Can you guys suggest some problems which are a fit for recursive domain ?

- Reverse a link list
- Factorial
- Sum of digits of a number.

Cheers!
One interesting exercise is 8 queens puzzle :
http://en.wikipedia.org/wiki/Eight_queens_puzzle
This one might be a little tough though.
Recursive descent parser. Very fun to make, as you start out simple, and it's easy to keep extending and adding more and more complexity. I'd recommend this:
http://compilers.iecc.com/crenshaw/

It's about actual assembly code generation, but you can just make it an interpreter instead of generating code. It gives you the general idea of how a recursive descent parser works. Also, it's in Pascal, but since pascal it pretty straight forwards you can map it easily to C++ or whatever other language you're working with.
Topic archived. No new replies allowed.