ExamVeda
Login
Home
51
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
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
52
Why is this heap named leftist heap?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
53
What is the space complexity of searching in a heap?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
54
Which of the following operations does not destroy the leftist heap property?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
55
The main distinguishable characterstic of a binomial heap from a binary heap is that
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
56
How many basic operations can be performed in a d-heap?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
57
What is the time complexity for deleting root key in a ternary heap of n elements?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
58
What is the reason for the efficiency of a pairing heap?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
59
If there are c children of the root, how many calls to the merge procedure is required to reassemble the heap?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
60
What is order of resultant heap after merging two tree of order k?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board