What is a child node?
The node which is the descendant(node which follows another node) of any node on a tree is known as a child node.
Or we can also say that every node excluding the root node is a child node in the tree. A child node always has a parent node to which it is connected. As you can see in the example below.
- Where nodes (B) and (C) are children of the node (A).
- Similarly, node (D) and node (E) are child nodes of (B).
- And node (F) and node (G) are child nodes of (C).
What are the different types of Nodes in a Tree
Trees are nonlinear data structures that organize data hierarchically and in a recursive manner.
It is a method of organizing and storing data in the computer in a way that makes it more effective to use. Nodes in the graph are connected via edges. It has different types of nodes which are called parent node, child node, leaf node, etc.