Week 5
This week is about recursion. Recursion is simply a process of defining a problem in terms of (a simpler version of) the problem itself. Recursion including the process case and a base case. A base case is a end case which would stop the recursion loop. For instance, eating a rice, if rice is empty then stop. So today we receive assignment about drawing tree figure. First, we need to make a tree's core, with a straight line. Next, make it separate into 2 branches, so let make it to the left first. (core - - left branch 1) Then we make a recursion, so we gotta make it all left, it should look like this. (core - - left branch 1 - - left branch 2 - - left branch 3) Next, when it comes at the end or leaves, so we make the right ones. core - - left branch 1 - - left branch 2 - - left branch 3 - - right branch 3) Then the recursion will be traced back at 'left branch 2' to make right ones. core - - left branch 1 - - left branch 2 - - right branch 2 - - left branch ...