Heaps - Study Mode
[#131] What is wrong with the following code of insertion in fibonacci heap. Choose the correct option FIB-INSERT(H, x)
degree[x]= 0
p[x]= NIL
child[x] =NIL
left[x] =x
right[x] =x
mark[x] =FALSE
concatenate the root list containing x with root list H
if min[H] = NIL or key[x] > key[min[H]]
then min[H]= x
n[H]= n[H] + 1
Correct Answer
(C) Line 9
[#132] In skew heaps, certain constraints are to be met in order to perform swapping.
Correct Answer
(B) false
[#133] Does there exist a heap with seven distinct elements so that the Inorder traversal gives the element in sorted order.
Correct Answer
(B) No
[#134] . . . . . . . . is a self-adjusting version of a leftist heap.
Correct Answer
(B) Skew heap
[#135] What is the location of a parent node for any arbitary node i?
Correct Answer
(C) floor(i/2) position