94.
What does this pseudo_code return?
int myfun(heap_arr[])
{
	int mini=INF;
	for(int i=0;i<tot_node;i++)
	mini=min(mini,heap_arr)
	return mini;
}

95.
For construction of a binary heap with property that parent node has value less than child node. In reference to that which line is incorrect. Line indexed from 1.
1. add(int k)
2. {
3.     heap_size++; 
4.     int i = heap_size - 1;
5.     harr[i] = k;
6.     while (i != 0 && harr[parent(i)] < harr[i])
7.     {
8.             swap(&harr[i], &harr[parent(i)]);
9.             i = parent(i);
10.    }
11. }

98.
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

99.
What is the complexity of given function of insertion.
insert(int n)
{
	if(buffer_size()< maxi_biffer_size())
	buffer_aar[ind]==n;
	else
	move_to_heap(buffer,buffer+maxi_buffer_size())
}

Read More Section(Heaps)

Each Section contains maximum 100 MCQs question on Heaps. To get more questions visit other sections.