GATEverse
← GATE CSE 2006

Q77

MCQ2 marks, −0.5

Statement for Linked Answer Questions 76 & 77: A 33-ary max heap is like a binary max heap, but instead of 22 children, nodes have 33 children. A 33-ary heap can be represented by an array as follows: The root is stored in the first location, a[0]a[0], nodes in the next level, from left to right, is stored from a[1]a[1] to a[3]a[3]. The nodes from the second level of the tree from left to right are stored from a[4]a[4] location onward. An item xx can be inserted into a 33-ary heap containing nn items by placing xx in the location a[n]a[n] and pushing it up the tree to satisfy the heap property. 76. Which one of the following is a valid sequence of elements in an array representing 3−3-ary max heap? 77. Suppose the elements 7,2,107, 2, 10 and 44 are inserted, in that order, into the valid 33-ary max heap found in the previous question, Q.76. Which one of the following is the sequence of items in the array representing the resultant heap? 10,7,9,8,3,1,5,2,6,410, 7, 9, 8, 3, 1, 5, 2, 6, 4 10,9,8,7,6,5,4,3,2,110, 9, 8, 7, 6, 5, 4, 3, 2, 1 10,9,4,5,7,6,8,2,1,310, 9, 4, 5, 7, 6, 8, 2, 1, 3 10,8,6,9,7,2,3,4,1,510, 8, 6, 9, 7, 2, 3, 4, 1, 5

Sign in to save attempts.

Loading…