Recursion is obviously one of those things you either get, or you don't get. The lecturer said it's one of the hardest things to get if you've got programming experience and haven't been using it.
I went around to Rick's to get some help with the current COMP1110 assignment, and we ended up scribbling on a whiteboard from about 7pm till after 4am. I think if either of us got recursion, it would have been trivial, but because neither of us seemed to have that enlightenment, we had to resort to what Rick calls "programming by accident" - having a stab until it works, which for a recursive algorithm is all the harder. Having a whiteboard helped, but I still think we managed to make a meal of the problem.
So now I can annotate my tree, with an implementation that is questionable in my opinion, compared to what Google had to about the algorithm.
Next stop, pruning the tree. I'm hoping (and thinking) that that is going to be a rather trivial exercise in wandering around the tree lopping off branches.