This week, we learned about a new type of data structure called Trees. This method of organizing data is used when the data you have is not in a linear structure (For example: Stacks, Lists, Queues, ect.).
With Trees, its not always obvious to organize things in a linear manner, instead, the idea of hierarchy is used to organize the data.
The basis of a tree structure consists of Nodes and Edges. Nodes can be thought of as a "point" in a tree (like the seed, or leaves), while Edges "connect" these Nodes together (much like branches). The main methods used for a Tree structure are traversing through, inserting/removing nodes, and inserting/removing subtrees at a Node.
Overall, the terminology and the overall concept of tree's aren't that hard to understand. Hopefully understanding the code will be just as easy.
No comments:
Post a Comment