Saturday, March 21, 2015

Week 8

This week we studied binary trees. This topic is rather interesting because the outcome of the tree is very predictable, which makes it easier to computer compared to regular tree. Each binary tree will have two children, and the child to the left will always have the value less than the value of the node, and the child to the right will always have value greater than the node. This feature of binary tree allows us to perform operations on the tree with much ease. For instance, I can easily search for a value in the tree by comparing the value with the value of the node. If it’s less than the node and it exists, I will know that it must be contained in the left tree, else it must be in the right. Using this feature, I can easily find my intended value. In addition to the easiness of performing operation on trees, operations can also be performed with high efficiency. This is because instead of working with the whole tree, the nature of binary tree often allows us to only operate with half a tree. This is significant amount of time saved, and will likely allow the program to run more smoothly and quickly.

We also studied about tree traversal this week. To be honest I do not necessarily get what is the point behind the different way of visiting a tree. My opinion is that it’s most efficient if we just stick with one method. Well I am just a noob in the industry so what can I say haha J

To conclude, this week’s work has been rather fun and interesting. I am however a little bit upset that our TAs went on strike and we no longer have tutorials. This is bad for me as I always learn a lot from the tutorials.

No comments:

Post a Comment