Why is the time complexity for insert O(log N) for a priority queue when it is O(1) for a min heap?

前端 未结 0 492
太阳男子
太阳男子 2021-01-06 07:07

The average time for heap insertion is O(1) and O(log N) for worst case (see here: https://stackoverflow.com/a/39517553/14714339). Since priority queues can be implemented w

相关标签:
回答
  • 消灭零回复
提交回复
热议问题