Saturday, March 14, 2015

Reflection about A2 & Test2

Hi sloggers!! Can't believe we already past 2/3 of this course ... and congratulation on finishing assignment 2 and test 2!! This week we had a test, so we did not learn much. I will just do a quick summary and talk about how I think of A2 and Test 2.
In class, we went back to BST and talk about how we can add and delete an element. It may seems like a simple task, but in order to make sure the datas are organized in the way we want, we got to do some extra work. Here is the algorithm for deleting a node.
you have to consider all the possible cases and I personally find number 5 hard to understand. Yet, if you think about this: you have a node that has two children and you want to delete it. Your replacement of that node should still make the tree a proper BST, which means all its left nodes must be less that the replacement node. Therefore, you have to either replace it with the largest from the left or the smallest from the right. It looks complicated, but it actually make sense if you think about the problem in a logical way.

Assignment 2 is definitely harder than the first one. The process of tackling recursion is like you feel like you get the answer, but after a while it does not make sense to you any more. However, once you get it, then you actually get it. I am so glad that Danny was willing to stay for almost 1.5 hour after Wednesday's class at night. I also really enjoy discussing the problem with my teammates, even though rough_outcome surprisingly gave us a hard time after we finished minimax, we were able to finish it at time. I hope the strike can end soon so we can get our results back!
Test 2 is fair in generally, I am glad that I reviewed the lab problems on my own and put them on the cheat sheet (they're really handy>>>)
That is all I want to say. Hope you all have a great week!!!

No comments:

Post a Comment