Tuesday 18 March 2014

Week 6 - Trees

We are into week 6 of the course, and this week we have been introduced to a completely new topic - Trees! Nope, not the ones that we see around us. These trees are upside down. They have their root at the top, and the leaves at the bottom! Sounds interesting, right? -- Yes it is!

This tree data structure is relatively easy to understand, and does not require much deep thinking. It just took me around 15 minutes to understand the basic features of a tree. I must say, the reading that was posted for this week was very well designed, and was to the point. The lecture and lecture slides complemented the readings nicely as well.

This week was not a very challenging one. The readings and the lecture material all were quite easy to understand. However, the lab was a bit tricky/confusing. I did not like the way of using comprehensions for coding. Though sometimes it may be efficient and require less lines of code, I found it quite challenging to interpret and use. I would therefore prefer the way we have learned so far using loops.

As I said, apart from the lab everything went pretty smooth this week. The only other thing which seemed a bit tricky were the tree traversals. I seem to get lost while traversing by myself, and have to start all over again. However, I believe this is because I am still very new to the topic. A bit more of practice is all I need to get a strong grip of this topic.

Oh, and finally I am done with Assignment 1. I am extremely happy that I finally finished it! It's a feeling of great relief and contentment.

Following is a screenshot of the output from my tour module, for eight cheeses. As Dan showed in lecture, 33 is the minimum number of moves for eight cheeses. So I am right!


Woohoo!


No comments:

Post a Comment