max-heap
GATE CSE & IT · Data Structures · 1996-2024
Study anchor
Cormen et al. — Introduction to Algorithms (CLRS)
Algorithms, data structures, graph algorithms, complexity
Practice action
Start latest PYQPYQs in this concept
All concepts →An array $[82, 101, 90, 11, 111, 75, 33, 131, 44, 93]$ is heapified. Which one of the following options represents the first three elements in the heapified array?
Which one of the following sequences when stored in an array at locations $$A[1],....,A[10]$$ forms a max-heap?
Let A be a priority queue for maintaining a set of elements. Suppose A is implemented using a max-heap data structure. The operation EXTRACT-MAX(A) extracts and deletes the maximum...
Consider the following statements : I. The smallest element in a max-heap is always at a leaf node II. The second largest element in a max-heap is always a child of the root node I...
Consider a max heap, represented by the array: 40, 30, 20, 10, 15, 16, 17, 8, 4. Array Index 1 2 3 4 5 6 7 8 9 Value 40 30 20 10 15 16 17 8 4 Now consider that a value 35 is insert...
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 ma...
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 th...
A max-heap is a heap where the value of each parent is greater than or equal to the value of its children. Which of the following is a max-heap?
A max-heap is a heap where the value of each parent is greater than or equal to the value of its children. Which of the following is a max-heap?
Consider a binary max-heap implemented using an array. Which one of the following array represents a binary max-heap?
Consider a binary max-heap implemented using an array. What is the content of the array {25, 14, 16, 13, 10, 8, 12} after two delete operations?
Consider the process of inserting an element into a Max Heap, where the Max Heap is represented by an array. Suppose we perform a binary search on the path from the new leaf to the...
A 3-ary max heap is like a binary max heap, but instead of 2 children, nodes have 3 children. A 3-ary heap can be represented by an array as follows: The root is stored in the firs...
A 3-ary max heap is like a binary max heap, but instead of 2 children, nodes have 3 children. A 3-ary heap can be represented by an array as follows: The root is stored in the firs...
In a binary max heap containing n numbers, the smallest element can be found in time
Which of the following sequences of array elements forms a heap?
A Priority-Queue is implemented as a Max-Heap. Initially, it has 5 elements. The level-order traversal of the heap is given below: 10, 8, 5, 3, 2 Two new elements ”1‘ and ”7‘ are i...
A Priority-Queue is implemented as a Max-Heap. Initially, it has 5 elements. The level-order traversal of the heap is given below: 10, 8, 5, 3, 2 Two new elements '1' and '7' are i...
The elements 32, 15, 20, 30, 12, 25, 16, are inserted one by one in the given order into a max Heap. The resultant max Heap is
The minimum number of interchanges needed to convert the array 89, 19, 40, 17, 12, 10, 2, 5, 7, 11, 6, 9, 70 into a heap with the maximum element at the root is