This week we discussed binary search trees. These are essentially binary tree that sort values into their respective spaces and used to increase search efficiency. All values less than the root are placed on the left most node, while values greater than the root are placed on the right most node.
The code used was almost identical with the code we used with a binary tree, expect that we implemented different functions (such as insert) that incorporated the property of a binary search tree. When coming up with the algorithm and writing the code, it was actually pretty easy to follow the steps and to trace it. Having knowledge about ordinary binary trees and traversing a tree, I was able to quickly understand the implementation.
Besides binary search trees, this week we also had our second term test. Overall, the test was......fair. It was a little more difficult than I expected, but it was not too difficult to think of a solution. I'm just hoping I passed and did decent. Wish me luck!

No comments:
Post a Comment