Vidyalelo
Data Structure · all questions

Heaps
practice.

Practice every MCQ with options. Use Show answers when you want the correct option and solution.

166

Questions

3/9

Page

Pick an option on a question to see the right answer and solution.

What operation is performed to convert a binary heap into a sorted array?

Select an option to see the answer and solution.

In which situation would you prefer using a Fibonacci heap over a binary heap?

Select an option to see the answer and solution.

Which algorithm uses a binary heap to improve its performance?

Select an option to see the answer and solution.

What is the maximum number of children a node can have in a binary heap?

Select an option to see the answer and solution.

How do you ensure that a binary heap remains a valid heap after multiple insertions?

Select an option to see the answer and solution.

Multiplication and division to find children and parents cannot be implemented in a d-heap.

Select an option to see the answer and solution.

A leftist heap is also said to be a binary heap.

Select an option to see the answer and solution.

Who invented d-ary heap?

Select an option to see the answer and solution.

What is the child of smallest element of the given minimum ternary heap?
Heaps mcq question image

Select an option to see the answer and solution.

Heap can be used as . . . . . . . .

Select an option to see the answer and solution.

The procedure given below is used to maintain min-order in the min heap. Find out the missing statements, represented as X.
procedure TrickleDownMin(i)
	 if A[i] has children then 
		m := index of smallest of the children 
		        or grandchildren (if any) of A[i] 
		if A[m] is a grandchild of A[i] then
			 if A[m] < A[i] then 
				swap A[i] and A[m]
				X: _______________________
					____________________
			 endif 	
			TrickleDownMin(m)
		 endif 
		else //{A[m] is a child of A[i]} 
			if A[m] << A[i] then 
				swap A[i] and A[m] 
		endif
	 endif

Select an option to see the answer and solution.

Why is this heap named leftist heap?

Select an option to see the answer and solution.

What is the space complexity of searching in a heap?

Select an option to see the answer and solution.

Which of the following operations does not destroy the leftist heap property?

Select an option to see the answer and solution.

The main distinguishable characterstic of a binomial heap from a binary heap is that

Select an option to see the answer and solution.

How many basic operations can be performed in a d-heap?

Select an option to see the answer and solution.

What is the time complexity for deleting root key in a ternary heap of n elements?

Select an option to see the answer and solution.

What is the reason for the efficiency of a pairing heap?

Select an option to see the answer and solution.

If there are c children of the root, how many calls to the merge procedure is required to reassemble the heap?

Select an option to see the answer and solution.

What is order of resultant heap after merging two tree of order k?

Select an option to see the answer and solution.