Before I start I would just like to say sorry for missing a post last week, I will try my best to continue keeping you guys up to date on my experiences with CSC148.
This weeks topic is object oriented concepts. So the few concepts we have covered so far are stacks, queues, and trees. Personally my favorite concept has been trees. Stacks and queues are pretty conventional and you see them everywhere, however, a tree is slightly more abstract. It is used to represent a hierarchy of importance and it is really interesting to see how that sort of data structure is formed. While a stack and queue can only point to one object at a time, a tree can point to as many as you set its maximum children to. I find the visualization of this object to be very interesting since you get a tree looking representation when you draw all the nodes and pointers the object has.
However, that being said, I have actually learned all of these data structures in the past. The only difference is that I learned how to create a binary tree as opposed to a general tree. This actually made it surprisingly difficult to initially understand the structure that was expected from the tree class. I was taught to use nodes as numbers and that you would organize smaller and equal numbers on the left child and greater numbers on the right child. Anyway, it ended up confusing me until I realized that there was none of that kind of sorting done in our implementation. I felt kind of silly but was glad to see we are doing something slightly different from what I know so far. I'm excited to see what is in store. Rock on!
No comments:
Post a Comment