Saturday, 21 February 2015
Slog 4
This week's lecture talks about a new abstract data type, which is tree. Tree can stores data in nodes and each child node is connected by a parent edge, to be noticed that, each node has only one parent node. Moreover, the path of a tree is the number of nodes, and the length is the number of edges. Tree is usually used to represent a hierarchical system. Furthermore, to write a class for tree, it is very important to divide it into two cases. Firstly, writing down the base case for the use of the tree. Secondly, writing the function on special case and then run recursion base on it. Consequently, tree is a very useful way to store data
Labels:
CSC148
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment