In previous weeks, we were introduced to several data structures - trees, binary trees and binary search trees; those ones were basically variations of each other. A tree would basically be a data structure in which data was represented as a node - or an individual object - which would point to other objects of the like - known as its children. Nodes without children were called leaves, and nodes with children would be root nodes of such children. Ultimately, the design of the tree was such that it would implement recursion to travel down the trees, and whatnot. Binary trees, on the other hand, followed the same idea as the generic tree structure, but instead of being able to have nodes that branched to n other nodes, binary trees could only have two. Furthermore, binary search trees, on the other hand, derived from binary trees, but differ in the fact that binary search trees could only have two nodes - the left node's value being smaller than its root node's and the right node's value being larger than its root node's!
Then we moved on to linked lists. One could consider linked lists to be a variation of lists, but like the tree, each value would be represented as its own object. A node in a linked list would contain two pieces of information - what value it held, and what other node(s) it pointed to. Intuitively, this was not difficult to visualize in the mind. For me, being bogged down on assignment 2 caused me to be a step back in understanding linked lists, and as such I spent an entire Thursday focusing on the implementation of linked lists - and their functions.
We are going to have a midterm on data structures soon, and I am almost at my breaking point. Between a CSC148 test on Wednesday I also have a CSC165 test on Tuesday (which mainly consists of practicing proofs and whatnot), and a religion essay due on March 12, which I haven't started to revise. Yes, this week is going to be a bummer.
No comments:
Post a Comment