Sunday, 15 March 2015

Week 7 Impressions

In week 6, we were introduced to the terminology for recursive trees and how to implement these types of functions. Now for week 7, we extended our knowledge of recursive trees and introduced Binary Tree Nodes (BTNodes) and Binary Search Trees (BSTs). This allows you to search for a value more effectively in a logarithmic function. In our labs we also implemented BTNode methods. This lab was the first lab that I began to write 'if' and 'else' statements in one line to make them look like list comprehensions so that the code looks cleaner. I also wanted to allow myself to have more options when writing my code. By having data to represent the left side of the node, the right side of the node and the node itself, I learned that there are three ways we can recursively explore a BST (which are inorder, preorder, and postorder). By learning these three tree traversals, I am now able to examine how a tree is evaluated when it is placed in binary order. I hope to use this recursion material in later weeks and later assignments.

No comments:

Post a Comment