什么是父节点以及如何存储它?
我想解决这个问题。即使IVlad回答了这个问题,我也不明白什么是父节点,什么是子节点。你能解释一下吗?
I want to solve this problem. Even IVlad answered the problem, I didn't understand what's parent node and what's child node. Can you explain me?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
任何有子节点的节点都称为父节点。父节点的后代是子节点。大多数节点可以是子节点的父节点和其他父节点的子节点。
http://en.wikipedia.org/wiki/Tree_(data_struct)
Any node that has a child is called a parent node. The descendents of the parent node are child nodes. Most nodes can be parents of children and children of other parents.
http://en.wikipedia.org/wiki/Tree_(data_structure)
在解决此类问题之前,您必须阅读树数据结构,父节点和子节点是树结构的字母表:
阅读树(数据结构) 和二叉树
You will have to read the Tree datastructure before solving such a problem, the Parent and Child nodes are the alphabet of the Tree structure :
Read the Terminology of a Tree (data structure) and Binary tree