simanto's blog

By simanto, history, 10 days ago, In English,

http://www.spoj.com/problems/HEAPULM/

how to solve this problem?? I tried a lot but i didn't get any idea how to solve this..

Thanks in Advance :)

 
 
 
 

»
9 days ago, # |
  Vote: I like it +6 Vote: I do not like it

Umm, The problem just asks you to create a treap, which is a very standard data structure. Simple googling will provide you with a code and explanation.

http://www.geeksforgeeks.org/treap-set-2-implementation-of-search-insert-and-delete

  • »
    »
    9 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I found this problem in a list of segment tree problem, so i thought it is solvable by segtree , but thanks for your idea :)