retagged by
2,369 views
2 votes
2 votes

When the priority queue is represented by max heap, the insertion and deletion of an element can be performed in (queue containing $n$ elements)

  1. $\theta(n)$ and $\theta(1)$ respectively
  2. $\theta(n)$ and $\theta(n)$ respectively
  3. $\theta(1)$ and $\theta(1)$ respectively
  4. None of the above
retagged by

2 Answers

Best answer
4 votes
4 votes
D is answer

Inserting Element take O(logn ) in worst case.(insert at least then find its correct possition)

Deletion Element take O(logn ) in worst case.( 1st we have to search that element)
selected by
Answer:

Related questions

4 votes
4 votes
1 answer
1
makhdoom ghaya asked Aug 24, 2016
4,348 views
Consider a hash table of size $m = 10000$ and the hash function $ h(k) = \lfloor m (KA \bmod 1) ' \rfloor$ for $A= \frac{(\sqrt{5}-1}{2}$ . The location to the key $k = ...
0 votes
0 votes
2 answers
2
makhdoom ghaya asked Aug 30, 2016
2,272 views
Which is the most valuable electronic commerce to the individual customer in long run ?Business to CustomerBusiness to BusinessCustomer to CustomerNone of the above
0 votes
0 votes
3 answers
3
makhdoom ghaya asked Aug 30, 2016
1,096 views
The principal electronic payment systems for electronic commerce isCredit CardDigital WalletElectronic ChequeAll of the above
2 votes
2 votes
1 answer
4
makhdoom ghaya asked Aug 30, 2016
2,459 views
"M-Commerce" refers toA myth which does not exist in realityThe ability of business to reach potential customers wherever they areThe ability to have large capacity of me...