You are here:

C++/Is heap an implicit data structure to implement priority queue?

Advertisement


Question
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

Answer
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.
Related Articles

C++

All Answers


Answers by Expert:


Ask Experts

Volunteer


Tehreem

Expertise

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

Experience

I am a C++ programmer.

Organizations
University of Engineering & Technology Lahore

Publications
http://recurseit.blogspot.com

Education/Credentials
I am doing BSCS.

©2016 About.com. All rights reserved.