Sunday, 23 February 2014

week 7

REEEEEcursion :( haha joking i should be making a happy face -_- :')

sooo it took me a while and a lot of work to kinda grasp the idea of recursion... (i am still not very pro at implementing functions with recursion...)
But basically, it is, simply a function that would call on itself, until it reaches a base case. If the base case does not exist, then your function is going to run till your wing crashes.. or gives you an error, which you don't want.

It is rreeeeally useful because of it's "recalling" nature. The recursion-ception provides you a platform to go "deeper" into the function, all the way to the base case. -> Saves you a lot of codes ! We started learning LinkedList, and it is basically a tree... but only with ONE child :o Same as the tree, when you reach the last one, it is = nonexistence = None ! Pretty simple.


No comments:

Post a Comment