Q77
MCQ2 marks, −0.5Statement for Linked Answer Questions 76 & 77: A -ary max heap is like a binary max heap, but instead of children, nodes have children. A -ary heap can be represented by an array as follows: The root is stored in the first location, , nodes in the next level, from left to right, is stored from to . The nodes from the second level of the tree from left to right are stored from location onward. An item can be inserted into a -ary heap containing items by placing in the location 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 ary max heap? 77. Suppose the elements and are inserted, in that order, into the valid -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?
Loading…