This week we focus on the topic of recursive structure. The most typical example of recursive structure is tree. The tree contains set of nodes with edges between some of the nodes. The leading node is called root, the nodes connect to it are called children. The node with no children is called leaf. The tree also have height and depth. The whole class of tree is a recursive structure. The most of part the implementation of tree requires recursion. I think recursion is really helpful although it is kind hard to understand first, however, once you master it you will find out it is really a really useful technique.
没有评论:
发表评论