Monday, February 20, 2017

CST 370 Week 7

Week 7

This week we covered binary search trees. There was a lot of emphasis on recursion (Google it... it's fun!) in the programming assignment. A good portion of the assignments for the week covered in-order, pre-order, and post-order tree traversals. It appeared in both the homework and programming assignments.

The concepts for these are pretty straight forward. They all traverse the tree in a similar way and vary based on when the contents of the node are displayed. The images here show the same path and the point in the path when each value is printed for in-order and pre-order traversals. All of these algorithms use recursive functions, treating each node as the root of a tree, for their implementation.

Binary search trees are very neat and efficient for finding values (assuming it's properly balanced). Instead of looking through an entire list, you can just go through the depth of the tree.

As I'm writing this, our final module for the course has been released and, based on a quick look, we're on to graphs! I'm very excited to close out another course in this program and get one step closer to graduation. It's become much more difficult to maintain focus but I'm pulling through!

Here is my programming assignment for the week:

No comments:

Post a Comment