Time Left - 05:00 mins

ISRO Exam CS 2017 Topic-Wise Quiz PDS( Binary Heap)

Attempt now to get your rank among 405 students!

Question 1

A priority queue is implemented as a Max-Heap. Initially, it has 5 elements. The level-order traversal of the heap is: 10, 8, 5, 3, 2. Two new elements 1 and 7 are inserted into the heap in that order. The level-order traversal of the heap after the insertion of the elements is:

Question 2

Consider the following array of elements.
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

Question 3

An operator delete (i) for a binary heap data structure is to be designed to delete the item in the i-th node. Assume that the heap is implemented in an array and i refers to the i-th index of the array. If the heap tree has depth d (number of edges on the path from the root to the farthest leaf), then what is the time complexity to re-fix the heap efficiently after the removal of the element?

Question 4

Suppose T(n) = 2T (n/2) + n, T(0) = T(1) = 1
Which one of the following is FALSE?

Question 5

The elements 32, 15, 20, 30, 12, 25, 16, are inserted one by one in the given order into a maxHeap. The resultant maxHeap is
  • 405 attempts
  • 1 upvote
  • 4 comments
Jun 8GATE & PSU CS