Let's look at an example first(which we learnt in class):
All recursion need a base case and a recursion step.
What I think difficult to do is to build the recursion step, it is really hard for me to find the relation ship between the base case and the current case. I was struggled for a long time on e2.
But fortunately, one of my friend taught me that I shouldn't think too much on the whole procedure, just figure out the relationship by simplify the current cases.
I did so, and was surprised to find I am done, I made it. It is no doubt that recursion is not that difficult, just analyse in a right way, every one can grasp it.
All recursion need a base case and a recursion step.
What I think difficult to do is to build the recursion step, it is really hard for me to find the relation ship between the base case and the current case. I was struggled for a long time on e2.
But fortunately, one of my friend taught me that I shouldn't think too much on the whole procedure, just figure out the relationship by simplify the current cases.
I did so, and was surprised to find I am done, I made it. It is no doubt that recursion is not that difficult, just analyse in a right way, every one can grasp it.