Data Structure Test Set 6

Data Structure Test Set 6

Q26➡ |
Which of the following sequences of array elements forms a heap?
i ➥ {23, 17, 14, 6, 13, 10, 1, 12, 7, 5}
ii ➥ {23, 17, 14, 6, 13, 10, 1, 5, 7, 12}
iii ➥ {23, 17, 14, 7, 13, 10, 1, 5, 6, 12}
iv ➥ {23, 17, 14, 7, 13, 10, 1, 12, 5, 7}

Q27➡ |
The height of a binary tree is the maximum number of edges in any root to leaf path. The maximum number of nodes in a binary tree of height h is:
i ➥ 2h−1
ii ➥ 2h−1 -1
iii ➥ 2h+1-1
iv ➥ 2h+1

Q28➡ |
The maximum number of binary trees that can be formed with three unlabeled nodes is:
i ➥ 1
ii ➥ 5
iii ➥ 4
iv ➥ 3

Q29➡ |
The inorder and preorder traversal of a binary tree are d b e a f c g and a b d e c f g, respectively. The postorder traversal of the binary tree is:
i ➥ d e b f g c a
ii ➥ e d b g f c a
iii ➥ e d b f g c a
iv ➥ d e f g b c a

Q30➡ |
A complete n-ary tree is a tree in which each node has n children or no children. Let I be the number of internal nodes and L be the number of leaves in a complete n-ary tree. If L = 41, and I = 10, what is the value of n?
i ➥ 6
ii ➥ 3
iii ➥ 4
iv ➥ 5

Weekly Test GATE/NTA NET CSA


2 thoughts on “Data Structure Test Set 6”

Leave a Reply

Your email address will not be published.

error: Content is protected !!
Open chat
1
Hi,how Can We Help You ?