For this weeks blog post, I will be discussing two main things-my approach to learning how "trees" work, as well as my approach-and opinions on the test #1 that just occurred last night. On to trees. python trees, not unsurprisingly are quite dissimilar to actual trees-the only similarity between these two are their "basic" components; leafs, nodes (branches), roots. Because python is not a graphic program, its impossible to actually draw trees-instead python uses their implementation of "lists" and nests a list, depending on how far down the path of the root to the leafs of a trees this list is. This was an extraordinary technique, because using recursion, you could in a sense-cycle down through the tree, into the "subtrees" till you reach your base case - a leaf that contains a piece of data. My one struggle with this idea, is the code we used to implement the tree, makes conceptual sense-although I still have trouble understanding the concept of a linked list (which was evident by my struggles in lab #6)
I also completed my first test yesterday! In 108, I always felt that the tests were a components of the course I struggled with-luckily I figured out my flaws, and better ways to study. In order to study-I made sure I knew my notes in depth, knew the important data structures and most importantly, understood how to trace all these new coding techniques. When it came to the test, I felt I did well-although I did make some mistakes I shouldn't have. For the first question, I felt the recursive tracing went fairly well, although it took me a while to understand at first, so I was unable to finish the last two calls in time to finish it. The second question, was similar to E2a, a very basic function to raise errors if certain conditions were met. The third question, also was quite similar to the lecture notes, a basic implementation of __contains__ that I had luckily included on my cheat sheet. The very last question, was a stack implementation that was a base class, that I understood-but unfortunately forgot that sum() doesn't work on a new ADT-I had tried to use the technique to create a temp stack, but couldn't quite figure out how to record the values in the stack. Overall, a decent result but I could be doing better.
Yet again, I would like to highlight the important posts my classmates have made in this course, firstly a post by http://achievementsuperlog.blogspot.ca/ on "Trees eh". He touched upon a very important concept of a tree, known as "traversal", which is how to move from leaf to leaf. In class we learned various techniques (post,pre etc order) in order to accomplish this, and reading his post, gave me the reminder to review those techniques myself.
Another important post I would like to draw attention to is http://aheapofpythons.wordpress.com/ on "Trees" again. This post discussed how we had actually been exposed to trees in lab #5-something that even I hadn't realized myself, since in the last lab, we essentially had a tree, we were recursively traversing to see if a number existed in it (sort of like the __contains__ method).
Thats all for now! Back to studying for my other midterms!
Yet again, I would like to highlight the important posts my classmates have made in this course, firstly a post by http://achievementsuperlog.blogspot.ca/ on "Trees eh". He touched upon a very important concept of a tree, known as "traversal", which is how to move from leaf to leaf. In class we learned various techniques (post,pre etc order) in order to accomplish this, and reading his post, gave me the reminder to review those techniques myself.
Another important post I would like to draw attention to is http://aheapofpythons.wordpress.com/ on "Trees" again. This post discussed how we had actually been exposed to trees in lab #5-something that even I hadn't realized myself, since in the last lab, we essentially had a tree, we were recursively traversing to see if a number existed in it (sort of like the __contains__ method).
Thats all for now! Back to studying for my other midterms!
No comments:
Post a Comment