answersLogoWhite

0

In programming, a parent node is any node that holds some reference to a child node. The child node may itself be a parent node.

A classic example of parent/child node usage is the binary tree, where every node in the tree may hold a reference to up to 2 children. Nodes that have no children are known as leaf nodes.

User Avatar

Wiki User

9y ago

What else can I help you with?

Continue Learning about Engineering
Related Questions

What is the outer part of a node?

The outer part of a node is often referred to as the parent node or the root node. It is the main starting point of a tree data structure, from which all other nodes branch out. The parent node does not have a direct parent, hence why it is considered the outer part of the node hierarchy.


What is the relationship between parent and child node?

that depends on what node means?


Steps of algorithum for delete node in linklist?

To delete a node (this) in a linked list, first you need to find the address of the parent node (parent).Iterate through the list, checking to find if the head pointer (head) or a child node (parent) points to (this).Store the next pointer of (this) in (parent) or (head), as determined by step 2.Delete (this).


In binary tree what is the name given to node that share the same parent node?

Sibling.


General tree to binary tree conversion?

The process of converting the general tree to a binary tree is as follows: * use the root of the general tree as the root of the binary tree * determine the first child of the root. This is the leftmost node in the general tree at the next level * insert this node. The child reference of the parent node refers to this node * continue finding the first child of each parent node and insert it below the parent node with the child reference of the parent to this node. * when no more first children exist in the path just used, move back to the parent of the last node entered and repeat the above process. In other words, determine the first sibling of the last node entered. * complete the tree for all nodes. In order to locate where the node fits you must search for the first child at that level and then follow the sibling references to a nil where the next sibling can be inserted. The children of any sibling node can be inserted by locating the parent and then inserting the first child. Then the above process is repeated.


When we insert a new node in a binary search tree will it become an internal node or terminal node?

It will be come a terminal node. Normally we call terminal nodes leaf nodes because a leaf has no branches other than its parent.


In binary tree what is the name given to nodes that share the same parent node?

Sibling.


What is the minimum depth of a leaf in a decision tree?

The minimum depth of a leaf in a decision tree is typically 0, meaning that a leaf node can be at the same level as its parent node.


How binary tree is represented as doubly link list?

In this representation, each node contains two pointers, one pointing to its parent (null in the case of root node) and the other pointing to its child node (null in the case of leaf nodes).


Progarm to delete previous node in linked list?

struct LinkedListNode { void* data; LinkedListNode* next; }; LinkedListNode* head; LinkedListNode* tmp; while (head) { tmp head->next; free(head); head tmp; }


Why is there only a need for one parent to give consent for underage dating?

http://www.sexlaws.org/node/1353/print


explain the process of converting tree to binary tree with example?

A binary tree is a type of tree data structure in which each node has at most two children. To convert a tree to a binary tree, we can follow these steps: Choose a root node for the binary tree. This will be the node at the top of the tree, and all other nodes will be connected to it. For each child node of the root node, add it as a left or right child of the root node, depending on its position relative to the root node. For each child node of the root node, repeat step 2 for its child nodes, adding them as left or right children of the appropriate parent node.