Tag Archives: Data Structures-Heap

Given two max heaps of size n each, what is the minimum possible time complexity to make a one max-heap of size from elements of… Read More
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… Read More
In a binary max heap containing n numbers, the smallest element can be found in time (GATE CS 2006) (A) 0(n) (B) O(logn) (C) 0(loglogn)… Read More
In a min-heap with n elements with the smallest element at the root, the 7th smallest element can be found in time a) (n log… Read More
We have a binary heap on n elements and wish to insert n more elements (not necessarily one after another) into this heap. The total… Read More
What is the content of the array after two delete operations on the correct answer to the previous question? (A) 14,13,12,10,8 (B) 14,12,13,8,10 (C) 14,13,8,12,10… Read More
Consider a binary max-heap implemented using an array. Which one of the following array represents a binary max-heap? (GATE CS 2009) (A) 25,12,16,13,10,8,14 (B) 25,12,16,13,10,8,14… Read More
Suppose the elements 7, 2, 10 and 4 are inserted, in that order, into the valid 3- ary max heap found in the above question,… Read More
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… Read More
A max-heap is a heap where the value of each parent is greater than or equal to the values of its children. Which of the… Read More
What is the time complexity of Build Heap operation. Build Heap is used to build a max(or min) binary heap from a given array. Build… Read More