Sunday, 15 March 2015

Week 10: Impressions of week 9

Week 10: Impressions of week 9

This week was test two. In the days leading up to the test, I reviewed linked lists, as they were the things I was the least familiar with.  I was feeling pretty good about all of the content, and about the test in general, up until the day of the test.  I realized that I had completely forgotten my cheat sheet, and I was praying that I wouldn't need it, as was the case for the last test.

The test itself was pretty simple.  The only trip ups I had were a question about pre order traversal which I forgot to review, and a question about linked lists, which I was a few lines short of completing in time.  I don't expect these two things will cause me to do too badly though. 

Week 9: Impressions of week 8

Week 9: Impressions of week 8


This week's main topic was linked lists.  Because of the nature of these, it seems like we diverged from recursion for a bit, as the only way I saw them being dealt with in class was iteratively,  These seem rather simple, although I'm unsure of what their use is, and as to what their advantage is over a regular list.  The linked list reading seems to say that their advantage is in their recursive structure, but why does that matter if we only deal with them without recursion?

The other major CSC148 event of the week is the due date for assignment 2.  My group and I expected this to be a simple short assignment, but thins got difficult quite quickly.  In total we spent about 2 hours on the tippy game state class and tippy move class, and then 6 hours working on the minimax strategy alone.  Even though it was only 20 lines or so of actual code,  it was a very tough problem for us to complete.  The concept of this strategy was very interesting, but also very difficult to get our heads around.  In the end we completed it through the use of "don't think about it too hard, just do what makes sense and let the recursion work its magic" and it worked out for us.

Sunday, 1 March 2015

Week 8: Impressions of Week 7

Week 8: Impressions of Week 7

The focus of week 7 has been on binary trees and their nodes.  This has been my favorite part of recursion so far, as I understand the structure of binary trees better, and appreciate their usefulness in binary search algorithms.

In preparation for the upcoming test, I downloaded the example BTnode.py class and practiced implementing some functions.  I found that the most tricky kind of function to implement was tree_sum,  which summed all of the elements of the tree.  I had to implement cases for whether or not node.left and node.right were equal to None or not, because a a for loop cant be used for the children like an ordinary tree.

I feel like I'm finally starting to get my head around recursion and trees.  Next on the list is linked lists.