# Tag Archives: Heap

## Scheduling priority tasks in limited time and minimizing lossSeptember 12, 2017

Given n tasks with arrival time, priority and number of time units they need. We need to schedule these tasks on a single resource. The… Read More »

## How to check if a given array represents a Binary Heap?October 4, 2015

Given an array, how to check if the given array represents a Binary Max-Heap.

## Data Structures | Heap | Question 12October 14, 2014

Which of the following Binary Min Heap operation has the highest time complexity? (A) Inserting an item under the assumption that the heap has capacity… Read More »

## Data Structures | Heap | Question 11August 19, 2013

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 »

## Data Structures | Heap | Question 12February 20, 2013

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 »

## Data Structures | Heap | Question 9

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 »

## Data Structures | Heap | Question 8

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 »

## Data Structures | Heap | Question 7

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 »

## Data Structures | Heap | Question 6February 18, 2013

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 »

## Data Structures | Heap | Question 5

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 »

## Data Structures | Heap | Question 4

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 »

## Data Structures | Heap | Question 3

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 »

## Data Structures | Heap | Question 2February 8, 2013

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 »

## Data Structures | Heap | Question 1January 31, 2013

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 »