Menu

Heaps Questions

MCQ
31.
Time taken in decreasing the node value in a binomial heap is
forum Discussion
MCQ
32.
The Statement
forum Discussion
MCQ
33.
Given a heap of n nodes.The maximum number of tree for building the heap is.
forum Discussion
MCQ
34.
Choose the option with function having same complexity for a fibonacci heap.
forum Discussion
MCQ
35.
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
forum Discussion
MCQ
36.
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
 }
forum Discussion
chevron_left BackPage 4 of 4