Need help on Priority Queue Implementations
Hi Everyone,
I need implementations of Priority Queue by using ordered array,unordered array,ordered linked list and unordered linked list and also for the heap.I tried on internet for examples but they are very simple not interactive.I need operations like Insert,findMax,delMax and merge in interactive mode.Please help me for these implementations in C++.
Thanks in advance.
Re: Need help on Priority Queue Implementations
What do you mean by "interactive mode"?
Anyway, take a look at the std::priority_queue adapter for an example of what a priority queue interface might be like. To implement with an ordered array or unordered array, you can build your implementation with the help of say, std::vector. To implement with an ordered linked list or unordered linked list, you can build your implementation with the help of say, std::list. To implement with a heap, you could build your implementation with the help of say, a std::vector with std::make_heap, std::push_heap, and std::pop_heap.
Re: Need help on Priority Queue Implementations
Quote:
I need implementations of Priority Queue
Is this for a home-work assignment? if so, then given the advice from laserlight in post #2, if you post what you then have we'll be able to provide further advice and guidance. See http://forums.codeguru.com/showthrea...ork-assignment