Chapter 6 Flashcards
non-linear abstract data type with a hierarchy-based structure.
tree
refers to the sequence of nodes along the edges of a tree.
Path
The node at the top of the tree is called .
Root
Any node except the root node has one edge upward to a node called .
Parent
The node below a given node connected by its edge downward is called
Child
The node which does not have any child node is called
Leaf
represents the descendants of a node.
Subtree
refers to checking the value of a node when control is on the node.
Visiting
means passing through nodes in a specific order.
Traversing
represents the generation of a node. If the root node is at level 0, then its next child node is at level 1, its grandchild is at level 2, and so on.
Levels
Represents a value of a node based on which a search operation is to be carried out for a node.
Keys
The node which is a predecessor of a node is called the __ of that node.
Parent Node
Any predecessor nodes on the path of the root to that node are called Ancestors of that node.
Ancestor of a Node
Any successor node on the path from the leaf node to that node.
Descendant
The count of edges on the path from the root node to that node.
Level of a node
node with at least one child is called
Internal node
Parent or child nodes of that node are called
Neighbour of a Node
Any node of the tree along with its descendant.
Subtree
each node can have a maximum of two children linked to it.
Binary tree
a tree data structure in which each node has at most three child nodes, usually distinguished as “left”, “mid” and “right”.
Ternary Tree
collection of nodes where each node is a data structure that consists of records and a list of references to its children(duplicate references are not allowed).
N-ary Tree or Generic Tree
Create a tree in the data structure.
Create
Inserts data in a tree.
Insert
−
Searches specific data in a tree to check whether it is present or not.
Search