## Data Structure Questions and Answers-Binomial and Fibonacci Heap

Congratulations - you have completed *Data Structure Questions and Answers-Binomial and Fibonacci Heap*.

You scored %%SCORE%% out of %%TOTAL%%.

Your performance has been rated as %%RATING%%

Your answers are highlighted below.

Question 11 [CLICK ON ANY COICE TO KNOW RIGHT ANSWER] |

Choose the option with function having same complexity for a fibonacci heap.

Insertion, Union | |

Insertion, Deletion | |

extract....min, insertion | |

Union, delete |

**UPSC FREE STUDY**

Question 11 Explanation:

For a fibonacci heap insertion, union take O(1) while remaining take O(logn) time.

Question 12 [CLICK ON ANY COICE TO KNOW RIGHT ANSWER] |

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

Line -11 | |

Line -3 | |

Line 9 | |

Line 7 |

**NTA NET study material**

Question 12 Explanation:

The main characterstics of a fibonacci heap is violated since min[H] must conatin one with smallest value.

Question 13 [CLICK ON ANY COICE TO KNOW RIGHT ANSWER] |

What will be the order of new heap created after union of heap H1 and H2 when created by the following code.Initially both are of the order n.

FIB....UNION(H1, H2) { H =MAKE....HEAP() min[H]= min[H1] concatenate the root list of H2 with the root list of H if (min[H1] = NIL) or (min[H2]!= NIL and min[H2] < min[H1]) then min[H] = min[H2] n[H]= n[H1] + n[H2] free the objects H1 and H2 return H }

n+1 | |

n+n/2 | |

nlogn | |

2*n |

**Aptitude test Questions answers**

Question 13 Explanation:

Union of two trees increase the order of the resultant by atmost value 1.

**Digital Education is a concept to renew the education system in the world. It is a program that endeavors to bridge the literacy slippage by delivering education through a digital platform to children and teachers. You can tell your friends regarding our intiative, click share button below.**

There are 13 questions to complete.