How do I make a Priority Queue as a Template class, in C++?
I'm also asked to implement it as a Binary Heap, but I'm currently more concerned with the first question as of now.
*Probably some good clarifications:
"At minimum, your template class should take one type parameter, specifying the type for the items. You may assume in your template class that the specified type has a < operator and an == operator defined for it, though you should be sure to document this assumption, as well as any others you're making, about the type parameter."
"Your priority queue template class may be hard-coded as a binary min heap, meaning that the minimum-priority item will always be considered the most important, and will thus be stored at the root."
Also, it is not to be a hard size queue.
Posted Dec 2, 2011, 3:38 AM UTC · edited