ExamVeda
Login
Home
81
The relationship of skew heaps to leftist heaps is analogous to that of?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
82
Given the pseudo code, state whether the function for merging of two heap is correct or not?
mergeTree(p,q)
if p.root.value <= q.root.value
return p.addTree(q)
else
return q.addTree(p)
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
83
What is the run time efficiency of an insertion algorithm?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
84
In a leftist heap, all the operations should be performed on?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
85
Given the code, choose the correct option that is consistent with the code. (Here A is the heap)
build(A,i)
left-> 2*i
right->2*i +1
temp- > i
if(left<= heap_length[A] ans A[left] >A[temp])
temp -> left
if (right = heap_length[A] and A[right] > A[temp])
temp->right
if temp!= i
swap(A[i],A[temp])
build(A,temp)
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
86
Should leaves in ternary heap be distributed from left to right.
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
87
If we implement heap as min-heap, deleting root node (value 1)from the heap. What would be the value of root node after second iteration if leaf node (value 100) is chosen to replace the root at start.
Heaps mcq question image
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
88
Heap exhibits the property of a binary tree?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
89
Pointer manipulation is generally more time-consuming than multiplication and division.
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
90
Which one of the following array elements represents a binary min heap?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board