Sunday, March 20, 2016

March 20th update

This week, we focused even more on binary trees and how they work. A lot of it is stressing again how simple yet intricate these trees can be, a simple node possibly leading to a whole new tree of code. It's really fascinating how deceptively simple the concept is, and what benefits it has over a regular tree.

In a regular tree, while it may be simple to add more children to a single node without much hassle, an issue would be the problem of organization of the tree. A BST node can only have two children at a time, but a normal tree could blow up from having way too many. BST condenses this issue with only two off shoots that can possibly lead into more trees, and they do so in a way that makes it so adding/removing a node wouldn't kill the entire experience. The usage of nodes linking to each other reminds me a lot about linked lists, as if you remove one, you can patch the relationship to the next without too much of a problem.

No comments:

Post a Comment