Sunday, March 16, 2014

Week #9

While last week's focus on LinkedLists, this week's was trees. Binary search trees to be more precise, they may seem simple at first, with just a simple rule for simple cases: for any element, say n, if element x is smaller than n it should be attached to its left and become the 'left child' while if it's greater than n placed on the right as a 'right child'. But as the simple cases go, there can also be quite a spike in difficulty if the Binary Search tree has multiple levels of children with the difficulty coming from actions such as where does the child go if it's smaller than some branches and larger than others and they all intertwine.

The Tree representation I posted from the 'How to Think Like a Computer Scientist' shows how each node is connected to a left node and a right node with each node having an associated value with it, or cargo.

My main challenge came from Binary Search Trees when it came to replacing values in the trees and how Recursion in general is used in tree traversal. Tree traversal also went over a topic that would come very handy for the assignment due next week with regular expressions as the chapter went over how to build expression trees.

Haven't really been able to look for another SLOG that really caught my eye due to my focus on finishing the second Assignment.

No comments:

Post a Comment