COMP 250 Lecture Notes - Lecture 17: Unix File System, Binary Tree, Linked List
Document Summary
So far, we have only looked at linear data structures. Some non-linear data structures are the tree and the graph . Directories, within a directory you have other directories, etc. There are two ways to think about family trees. First way, you think of your children and their children etc. A person can have no children or lots of children -- this is a very general tree. You think of the people above you -- your parents, your grandparents, etc. You have exactly two parents, they each have exactly two parents, etc. The relations between the nodes are called edges . In this case, the edges have arrows on them, so they are directed edges . In this example, they are all pointing down. There is one node at the top which is called the root node . Potentially, you can move the boxes around, and then the notion of level" becomes harder to picture.