Tree Data Structures questions

Q21

GATE CS 2015 CS-3Tree Data StructuresNAT1 mark
Consider a binary tree T that has 200 leaf nodes. Then, the number of nodes in T that have exactly two children are ____________.
Show answer without attempting

Answer: 199

Q27

GATE CS 2015 CS-3Tree Data StructuresMCQ1 mark−1/3 if wrong
While inserting the elements 71,65,84,69,67,8371, 65, 84, 69, 67, 83 in an empty binary search tree (BST) in the sequence shown, the element in the lowest level is
Show answer without attempting

Answer: B

Q30

GATE CS 2015 CS-3Tree Data StructuresMCQ1 mark−1/3 if wrong
Consider the following array of elements.

(89,19,50,17,12,15,2,5,7,11,6,9,100)(89, 19, 50, 17, 12, 15, 2, 5, 7, 11, 6, 9, 100)

The minimum number of interchanges needed to convert it into a max-heap is
Show answer without attempting

Answer: D

Q15

GATE CS 2015 CS-1Tree Data StructuresMCQ1 mark−1/3 if wrong
The height of a tree is the length of the longest root-to-leaf path in it. The maximum and minimum number of nodes in a binary tree of height 5 are
Show answer without attempting

Answer: A

Q17

GATE CS 2015 CS-1Tree Data StructuresMCQ1 mark−1/3 if wrong
Which of the following is/are correct inorder traversal sequence(s) of binary search tree(s)?

I. 3, 5, 7, 8, 15, 19, 25
II. 5, 8, 9, 12, 10, 15, 25
III. 2, 7, 10, 8, 14, 16, 20
IV. 4, 6, 7, 9, 18, 20, 25
Show answer without attempting

Answer: A

Q35

GATE CS 2015 CS-1Tree Data StructuresMCQ1 mark−1/3 if wrong
What are the worst-case complexities of insertion and deletion of a key in a binary search tree?
Show answer without attempting

Answer: B

Q37

GATE CS 2015 CS-1Tree Data StructuresMCQ2 marks−2/3 if wrong
Consider a max heap, represented by the array: 40, 30, 20, 10, 15, 16, 17, 8, 4.
Array Index123456789
Value4030201015161784
Now consider that a value 35 is inserted into this heap. After insertion, the new heap is
Show answer without attempting

Answer: B

Q22

GATE CS 2015 CS-2Tree Data StructuresMCQ1 mark−1/3 if wrong
Consider a complete binary tree where the left and the right subtrees of the root are max-heaps. The lower bound for the number of operations to convert the tree to a heap is
Show answer without attempting

Answer: A

Q23

GATE CS 2015 CS-2Tree Data StructuresNAT1 mark
A binary tree T has 20 leaves. The number of nodes in T having two children is _______.
Show answer without attempting

Answer: 19

0/90 correct0 marks

Related topics in Programming and Data Structures