Saturday, 15 February 2014

Slog #4 (Week 6) Stumped With Trees

I'll admit, I'm stumped. Like a tree. Heh, get it? I'm not actually stumped, I only said so to use lame puns. So what's the deal with trees? For starters, they aren't like real trees. This week we dealth with binary trees. Think of a blob. And then it grows 2 limbs with blobs at the ends. And those 2 blobs grow 2 more limbs with blobs at the end, and so on. A binary tree is something like that. I really suck at explaining. Simply put, it's another abstract data type. In this case, you have an object that has 0, 1 or 2 children. The max number of children it can have is called the arity factor. Binary trees have an arity/branching factor of 2. No surprise there. But the cool part is that the children themselves are binary trees. It was fairly easy to understand the concept, and it was fun during the labs to explore how to work with the binary trees themselves. The idea of a binary tree's children being binary trees brings back the idea of recursion, and during the labs it helped me refine my ability at being able to do recursive functions more efficiently.

This week is also the week we have to hand in assignment 1. I've spent countless hours reading it, and from what I've managed to code, I think everything is okay. I think the trick is to really read it until it hurts, then read some more. And then hopefully by then it makes sense. If future me is reading this, I hope you ace this project.

EDIT: Woo, we aced it. Hell yea.

No comments:

Post a Comment