The Priority queue can be implemented with heap. Each node position in the tree is corresponding to the index in the array.