The ability to traverse a tree is an important basic foundational concept. A tree is a data structure with a collection of nodes with a hierarchical pattern. Each node is its own data structure. A tree’s structure has a single ‘root’ node and each node has a value and a reference pointing to its children nodes.
遍历树的能力是重要的基本基础概念。 树是一种数据结构,其中包含具有分层模式的节点的集合。 每个节点都是其自己的数据结构。 一棵树的结构只有一个“根”节点,每个节点都有一个值和一个指向其子节点的引用。
![Image for post](https://i-blog.csdnimg.cn/blog_migrate/b7efb7312da891f5c8db71150c252c6c.png)
The simple tree concepts to be covered in this post are:
本文中将涉及的简单树概念是:
Construct a Tree class using