COMPUTER SCIENCE AND ENGINEERING
DATA STRUCTURES
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
child
|
|
parent
|
|
siblings
|
|
none of above
|
Detailed explanation-1: -DEFINITION: The degree of a node is the number of its children. The degree of a tree is the maximum degree of any of its nodes. DEFINITION: Nodes with the same parent are called siblings.
Detailed explanation-2: -The successors of a node are called its children; the unique predecessor of a node is called its parent.
Detailed explanation-3: -A node that has a child is called the child’s parent node (or superior). All nodes have exactly one parent, except the topmost root node, which has none. A node might have many ancestor nodes, such as the parent’s parent. Child nodes with the same parent are sibling nodes.
Detailed explanation-4: -Where is the predecessor of a node in a tree, assuming all keys are distinct? If X has two children, its predecessor is the maximum value in its left subtree and its successor the minimum value in its right subtree. If it does not have a left child, a node’s predecessor is its rst left ancestor.