Our job was to create method that evaluate the BTNode, in other words put all the data into application and add, multiply... every data. And also there is a method for representing what is in the tree...etc.
Although there are a lot of similarities in the recursive code we wrote in the previous week, however, this week's code is much more complex. Instead of getting the job done in four or five lines of code, we need to consider more cases this time, therefore, more lines of code.
This week's lab took me a lot more time than the last week, mainly because I thought we only need to write the function in a few lines, but after I realized that we need a lot more lines to finish each function, everything becomes clear again.
I cannot say that this week's recursion is confusing because it is not. Recursion code is made a lot clearer to me than when I first got my hand on it. It is really interesting and I am really looking forward to put it to use in the newest assignment!
No comments:
Post a Comment