Friday, 13 March 2015

Week 9 SLOG

During this past week we learned how to mutate binary search trees by inserting or deleting nodes. We began by looking at different scenarios, and deciding how we would delete a specific node so that the BST chracteristics still remained. First, we worked with deteting the root of the BST when the tree had only either a left child or a right child, but not both. In this case, the root of the subtree would become the new node. The diffuculty arose when we tried to delete a node that was the root of both a left child and a right child. In order to figure out this problem, we tried to find another node in the existing tree that would still satisfy the properties of the BST if the said node were to replace the deleted node. By doing this, we learned that either the maximum of the left nodes or the minimum of the right nodes would work in this situation. Overall, I didn't feel that comfortable with the material from this  week's class because we only had one lecture due to the midterm this week. Working on the lab however, might fix this problem.

In terms of the midterm this week, I felt pretty nervous about working with linked lists, so I spent most of my time reviewing the code for linked lists that my instructor posted on the website. Overall, I think that the test was pretty fair.

No comments:

Post a Comment