Priority Queue

A bag that can put things in, pick things out, peek things in it but only interact with the smallest(biggest, best whatever) one is allowed.
That is, when there is a queue, there always is something has higher priority and should leave as soon as possible.

Operation

Data Structure Used to Implement: Heaps

Definition

Operation

Storage

Same to Disjoint Set, we use array and map.
But for complete binary tree, the parent will be same.(Above all, this is how it is defined)

So, the parent array is discarded.
Tree

Similarly, the index of parent will be (k - 1) / 2

Runtime