As I was writing exercise 5, I believe that recursion is one of the hardest concepts I have ever tried to understand. I know that it is critical to write it as short as possible, but sometimes you just don't see the best solution. I recommend Prof. Heap to give students an easier and more examples and assingments about recursive functions.
Recursion is indeed quite difficult to get your head around at first, but can be very rewarding once you do so. Here's a good place to practice recursion: http://codingbat.com/
ReplyDeleteDon't forget that you're always encouraged to go to office hours and to ask questions during your lab time!