A directory of Objective Type Questions covering all the Computer Science subjects. Here you can access and discuss Multiple choice questions and answers for various compitative exams and interviews.

Discussion Forum

Que. A priority queue is implemented as a max-heap. Initially, it has five elements. The level-order traversal of the heap is as follows:

20, 18, 15, 13, 12

Two new elements ‘10’ and ‘17’ are inserted in the heap in that order. The level-order traversal of the heap after the insertion of the element is:
a. 20, 18, 17, 15, 13, 12, 10
b. 20, 18, 17, 12, 13, 10, 15
c. 20, 18, 17, 10, 12, 13, 15
d. 20, 18, 17, 13, 12, 10, 15
Answer:20, 18, 17, 13, 12, 10, 15
Confused About the Answer? Ask for Details Here
Know Explanation? Add it Here

Similar Questions: