Database-Management-System
August 29, 2024Database-Management-System
August 29, 2024Database-Management-System
Question 575 |
Leaves of which of the following trees are at the same level ?
Binary tree | |
B-tree | |
AVL-tree | |
Expression tree |
Question 575 Explanation:
Binary Tree: A binary tree is a tree in which every node is having at most two children. The nodes with zero child are named as leaf nodes and the nodes having 1 or 2 children are termed as parent node.
In a binary tree all leaf nodes may or may not present at same levels.
A binary tree is not necessarily a balanced tree also. It could be a unbalanced tree.

B-tree: A B-tree is a almost complete binary tree in which each node can contains multiple key values and can have multiple children. A tree is complete binary tree if the level before the last level of tree is completely filled and the leaf nodes in such tree are present at the same level only. In below diagram B,C,D are the leaf nodes.

AVL tree: AVL tree is a balanced binary search tree. In this each node can have at most two children and the height of each node can be -1,0,1. A AVL tree is a balanced binary search tree but it is not necessary that each node of this tree are present at same level.

Expression tree: is a specific kind of a binary tree used to represent expressions. These trees can represent expressions that contain both unary and binary operators. In below diagram a,b,c are leaf nodes and the are not present at same level.
In a binary tree all leaf nodes may or may not present at same levels.
A binary tree is not necessarily a balanced tree also. It could be a unbalanced tree.
B-tree: A B-tree is a almost complete binary tree in which each node can contains multiple key values and can have multiple children. A tree is complete binary tree if the level before the last level of tree is completely filled and the leaf nodes in such tree are present at the same level only. In below diagram B,C,D are the leaf nodes.
AVL tree: AVL tree is a balanced binary search tree. In this each node can have at most two children and the height of each node can be -1,0,1. A AVL tree is a balanced binary search tree but it is not necessary that each node of this tree are present at same level.
Expression tree: is a specific kind of a binary tree used to represent expressions. These trees can represent expressions that contain both unary and binary operators. In below diagram a,b,c are leaf nodes and the are not present at same level.
Correct Answer: D
Question 575 Explanation:
Binary Tree: A binary tree is a tree in which every node is having at most two children. The nodes with zero child are named as leaf nodes and the nodes having 1 or 2 children are termed as parent node.
In a binary tree all leaf nodes may or may not present at same levels.
A binary tree is not necessarily a balanced tree also. It could be a unbalanced tree.

B-tree: A B-tree is a almost complete binary tree in which each node can contains multiple key values and can have multiple children. A tree is complete binary tree if the level before the last level of tree is completely filled and the leaf nodes in such tree are present at the same level only. In below diagram B,C,D are the leaf nodes.

AVL tree: AVL tree is a balanced binary search tree. In this each node can have at most two children and the height of each node can be -1,0,1. A AVL tree is a balanced binary search tree but it is not necessary that each node of this tree are present at same level.

Expression tree: is a specific kind of a binary tree used to represent expressions. These trees can represent expressions that contain both unary and binary operators. In below diagram a,b,c are leaf nodes and the are not present at same level.
In a binary tree all leaf nodes may or may not present at same levels.
A binary tree is not necessarily a balanced tree also. It could be a unbalanced tree.
B-tree: A B-tree is a almost complete binary tree in which each node can contains multiple key values and can have multiple children. A tree is complete binary tree if the level before the last level of tree is completely filled and the leaf nodes in such tree are present at the same level only. In below diagram B,C,D are the leaf nodes.
AVL tree: AVL tree is a balanced binary search tree. In this each node can have at most two children and the height of each node can be -1,0,1. A AVL tree is a balanced binary search tree but it is not necessary that each node of this tree are present at same level.
Expression tree: is a specific kind of a binary tree used to represent expressions. These trees can represent expressions that contain both unary and binary operators. In below diagram a,b,c are leaf nodes and the are not present at same level.