Implementing priority queue using max heap vs balanced BST

后端 未结 0 1673
礼貌的吻别
礼貌的吻别 2021-01-25 16:56

Balanced BST and max heap both perform insert and delete in O(logn). However, finding max value in a max heap is O(1) but this is O(logn)

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