GeeksforGeeks » Algorithms

Design a DS

(1 post)
  • Started 8 months ago by prabhat
  1. prabhat
    guest
    Posted 8 months ago #

    Design a DS having following operation :
    1. insert(s,x) : insert element x in set s
    2. delete_max_half() : delete largest ceiling( s/2) elements

    condition: a sequence of m above operation take O(m) time i.e amortize cost is O(1) for both operation ... coremen question


Reply

You must log in to post.

RSS feed for this topic