For a perfect binary tree of height 4. What will be the sum of heights of nodes?31
302726
For a perfect binary tree of height h, having N nodes, the sum of heights of nodes is _____________.
N – (h – 1)
N – (h + 1)
N – 1
N – 1 + h
If we want to find median of 50 elements, then after applying buildHeap method, how many times deleteMin method will be called ?
5
25
35
50
Which of the following heap method increase the value of key at position ‘p’ by the amount ‘delta’?
increaseKey(p,delta)
decreaseKey(p,delta)
preculateDown(p,delta)
remove(p,delta)
The main reason of using heap in priority queue is
improve performance
code is readable
less code
heap can't be used in priority queues
The total number of nodes on 10th level of a perfect binary tree are :
256
512
1024
Can't be determined
Which property of equivalence relation is satisfied if we say: Ahmad R(is related to) Ahmad
Reflexivity
Symmetry
Transitivity
All of the above
Which of the following heap method lowers the value of key at position ‘p’ by the amount ‘delta’?
increaseKey(p,delta)
decreaseKey(p,delta)
preculateDown(p,delta)
remove(p,delta)
We can build a heap in _____ time.
Linear
Exponential
Polynomial
None of the given options
If a tree has 50 nodes, then the total edges/links in the tree will be :