Self Implemented Priority Queue giving TLE despite push and pop operation being O(LogN)

Revision en1, by hulk_baba, 2017-07-05 10:48:07

Hello. I was trying to implement priority queue by myself, though I have used priority_queue from C++ STL many times. I was getting TLE for a very simple problem but when I used STL it got accepted. I believe time complexity of my priority queue for insert and pop() operation is O(log N) and overall complexity of solution is O(NlogN). please see the submission here.

Tags priority queue

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English hulk_baba 2017-07-05 10:48:07 506 Initial revision (published)