You are here:

- Home
- Computing/Technology
- C/C++
- C++
- Is heap an implicit data structure to implement priority queue?

Advertisement

My question might seem childish but I really don't understand this question as I am just a newbie to data structures course. I do know how max and min hip work, but I am not sure that whether heap is implicit data structure to implement priority queue.

Kindly clear my confusion.

Thanks...

Alan

Heap itself is an implicit data structure. But it is not specialized for priority queue. A priority queue can be implemented in anyway you like e.g linked list. Heap is just a good way to implement priority queue of all the ways it can be implemented.

I can answer questions related to C++ coding and programming techniques.

I am a C++ programmer.**Organizations**

University of Engineering & Technology Lahore**Publications**

http://recurseit.blogspot.com**Education/Credentials**

I am doing BSCS.