This week we mainly learnt about recursion and list
comprehensions. I personally liked list comprehensions and found them little
challenging. I thought they were a little to understand at first, but gradually
I got hold of them. They make the code look much more clear, shorter and
concise.
The other thing was one of the most important topics of this
course and programming – Recursion. It is to solve the problem by breaking it
into smaller problem and using the solution of the smaller problem to solve the
bigger problem. I felt it to be really tricky, every time I thought I got hold
of it, but the next example left me with loads of confusions. Now I think I
understand it (hopefully). The thing that helped me the most in understanding
it was going through the definition of recursion again and again. Just solve a
smaller multiple of the problem and call it again to solve the rest of the
problem..!!
No comments:
Post a Comment