Friday, 11 October 2013

Week 5 - Binary Trees

This week, we talked about binary trees and three types of traversals: pre-order and in-order and post-order

preorder traversal: you visit the root, then pre-order left subtree, then pre-order right subtree

In order traversal: you visit in-order left subtree, then the root, then in-order right subtree

In post order traversal: You visit post-order left subtree, then post-order rightsubtree then the root

On the 16th is our mid-term it is going to be covering recursion, inheritance and exceptions. I'm going to have to go over recursion it is still very fuzzy to me; I plan on finishing up and reviewing the labs because I find those questions to be challenging. Recursions remind me of Recursive Sequences and Series from MAT137, in which a term is defined by the previous term in the Sequence.

A simple example: A(k+1) = A(k)*2 + 7

So every term is double the previous term plus 7, and you can define the parameter k to be any set of numbers you like.

In non-computer science related news, today I saw Despicable Me - I cried. Alot.
Pic related.

Such kawaii

No comments:

Post a Comment