Thinking recursively can be quite hard, especially if there is an iterative solution right on top.