adplus-dvertising
frame-decoration

Question

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

a.

Line -11

b.

Line -3

c.

Line 9

d.

Line 7

Answer: (c).Line 9

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is wrong with the following code of insertion in fibonacci heap. Choose the correct option

Similar Questions

Discover Related MCQs

Q. What is a hash table?

Q. If several elements are competing for the same bucket in the hash table, what is it called?

Q. What is direct addressing?

Q. What is the search complexity in direct addressing?

Q. What is a hash function?

Q. What can be the techniques to avoid collision?

Q. What is the load factor?

Q. What is simple uniform hashing?

Q. In simple uniform hashing, what is the search complexity?

Q. In simple chaining, what data structure is appropriate?

Q. When is it appropriate to use direct addressing?

Q. What is the time complexity to insert an element into the direct address table?

Q. What is the advantage of using a dynamic set in direct addressing?

Q. What is the time complexity to delete an element from the direct address table?

Q. How is a bit vector better compared to a normal array for implementing the hash table?

Q. A ________ is a special Tree-based data structure in which the tree is a complete binary tree.

Q. How many type of heap are there?

Q. In which heap the root node must be greatest among the keys present at all of its children?

Q. What is the complexity of adding an element to the heap?

Q. An array consists of n elements. We want to create a heap using the elements. The time complexity of building a heap will be in order of