Wednesday, 19 March 2014

Week #9

This week's blog is a little late. I usually type the out in word and then transfer it to the text box but I completely forgot to until today.

On Monday of this week, most of the class was spent talking about Binary search trees. After the tutorial, I'm feeling pretty confident about BST's. it really helped to do some implementation of my home. It especially hit home how important recursion is. The bonus exercise was almost impossible to figure out but my partner was able to figure out an algorithm.

After that we started talking about runtime and performance and how different algorithms have different level of efficiency based on how much time it takes to run a function compared to the size of the input. Interestingly enough we are talking about the exact same thing in CSC165. We pretty much just started on big-oh so I'm not terrible comfortable with it yet but I was able to understand the gist of what the professor was saying.

We also talked about Exercise 3 and a little bit about Assignment 2 part 2. I already looked over part 2 of assignment 2 and even though it looked daunting I have a pretty good idea about how to go about it. After the professor explained the relationship between the inorder list and the preorder list, it was easy to code part A of Exercise 3. Part B was a little trickier but the hint on making a helper function that returns both the depth and that sum at that depth really helped.

No comments:

Post a Comment