Is heap an abstract data type? If so, what about priority queues?
问题 I read that priority queue is an abstract data type for heap data structure or to put it in another way, heap is an implementation for priority queues. But what confuses me is that I see heap in itself as an ADT since they're normally implemented using arrays (talking about min/max heaps here). Could someone give me a clear distinction among the three within the realm of ADT? 回答1: Let me answer you in two steps.. i) Defenitions Data type is a set of values together with operations on that