This week we learned about mutating binary search trees. Inserting and deleting data from a binary search tree is takes more effort than it would on an arbitrary tree, due to the nature of the tree. Data less than the node goes on the left, greater on the right, so an insert function would have to handle this accordingly. Deleting also takes some effort, since if the node you are deleting has children, you would have to deal with how to take care of the child node. Overall, a fairly straightforward if not annoying concept.
In terms of coursework, we had a test to take on the same day, which covered recursion and recursive data structures. We were given questions that dealt with linked lists and trees and such. Difficulty was fair, as doing prior labs and term tests helped in preparing for this.
No comments:
Post a Comment