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

Правка en1, от 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.

Теги priority queue

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский hulk_baba 2017-07-05 10:48:07 506 Initial revision (published)