Sunday, 16 February 2014

Trees!

This week in CSC148, the topic we covered was Trees. Trees are a very interesting data structure that is very useful in computer programming. It is made up of series of nodes which contain data. Nodes continually store data like branches in a tree until they reach the endpoint, which is the leaf. The leaf has no more children.

The Tree data structure uses a lot of what we previously learned. A big part of this is recursion. We use recursion a lot, especially when we are traversing through the tree. There are three types of traversal. Post, Pre and In order traversal. I find it very easy to differentiate between them by remembering that one is-
left top right, right top left and top left right. By using this it is easy to make the traversal be understood.

In other news, the midterm is coming up. I have to say, it is quite scary to think about it. I am particularly worried in forgetting the simple syntax that we learned. Usually when i code and forget about a specific function, I have the option in looking it up. If the English language is proving difficult to understand, I could always type it in the shell. In the test, I do not have this luxury. Therefore, for me, it might prove difficult.

1 comment: