I want to sol开发者_StackOverflowve this problem. Even IVlad answered the problem, I didn't understand what's parent node and what's child node. Can you explain me?
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
精彩评论