# Data Structure Questions and Answers-Binomial and Fibonacci Heap

## 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%%

 Question 11 [CLICK ON ANY COICE TO KNOW RIGHT ANSWER]
Choose the option with function having same complexity for a fibonacci heap.
 A Insertion, Union B Insertion, Deletion C extract....min, insertion D 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
 A Line -11 B Line -3 C Line 9 D 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 	}
 A n+1 B n+n/2 C nlogn D 2*n