Time Left - 15:00 mins

GATE CS 2021: Data Structure & Programming Quiz 8 (App update required to attempt this test)

Attempt now to get your rank among 584 students!

Question 1

Consider the following elements in a heap {17, 9, 6, 3, 12, 2, 15, 14, 20, 13, 21}. The minimum number of exchanges to convert it into a minheap be P. Then the minimum number of elements that can be arranged in a BST of height P is

Question 2

Max-heap is constructed by inserting the following integer in the given order into an empty tree. The sum of integer values present at the leafs of max heap tree is ________.

20, 32, 1, 3, 4, 5, 6, 7, 10, 23, 45

Question 3

If elements are inserted into a maxheap in the following order: 12, 43, 23, 11, 15, 4, 20, 35 the element in the level 3 is.

Question 4

Consider a max heap represented by the array elements:
{50, 25, 22, 17, 16, 15, 12, 10, 9}. The following operations are carried out: 17 is deleted, 24 is inserted. The number of operations to heapify is

Question 5

Consider the array A = < 4, 1, 3, 2, 16, 9, 10, 14, 8, 7 >. After building max heap from the array A, the height (the longest path from root to the leaf) of the heap and the sum of elements present in the root’s right subtree are equal to _______ and _______. (Root is at level 0)

Question 6

What is the worst case time complexity to delete middle element from min heap of n distinct element?
  • 584 attempts
  • 1 upvote
  • 5 comments
Apr 17GATE & PSU CS