Tuesday, March 17, 2015
Week 8 - Binary Trees
One of the main topics we discussed in week 7 was Binary Trees. The main difference between binary trees and regular trees is how they deal with children. Binary trees have at most two children in them. So where tree's would have a list of children for self.children, binary trees have self.left and self.right. Some of the implications of this are that when we have a binary search tree, we can choose to perform recursion on the right side of the tree or the left side. Initially, I thought that these trees would be easier to work with, since they only have two children to deal with. That's true to some extent. For lab #6, the functions were easier to implement because the binary tree structure as a consistent logic to it. But as we find out in next week's class, they can be considerably more complicated!!
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment