As the title indicates, this week the second midterm of the course was held. On the other two sections, we worked with mutability of trees.
Luckily for all of us, this midterm was much more fair in terms of time. There was plenty of time to read every question, analyze the problem, and then double check solutions after they had been implemented. As expected, LinkedLists, Trees and nested list recursion all showed up. I believe I understood what I was doing for the majority, although thinking back I may have missed checking for a specific case on the first question, which is currently eating away at me. Overall however, there is not much to complain about, it was a perfectly fair test.
As previously mentioned, this week in class we discussed Tree and BinaryTree functions which mutated their respective data types. One example of this was the delete method in a Binary Search Tree, in which different steps had to be taken to assure the desired deletion of a node. We further implemented some more of these functions in the week's lab, and something noteworthy to me was working on a function, recommended by my TA, which would merge two binary trees according to some specific criteria. This was challenging at first but very rewarding once I figured out a method which covered all of the cases. I used the method that we are familiar with currently, which is starting from the root node and moving down to the children, in the future I hope to be able to do the same but working backwards instead.
The next pressing task is finishing all of Assignment 2, which is due the following week. On to the next time.
No comments:
Post a Comment